-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflow: add testing-env image build/publish process (#1780)
* workflow: add testing-env image build/publish process replacing https://hub.docker.com/r/runatlantis/testing-env Signed-off-by: Rui Chen <[email protected]> * refresh the testing-env image * only runs on master branch Signed-off-by: Rui Chen <[email protected]>
- Loading branch information
1 parent
f2ded06
commit ffda290
Showing
4 changed files
with
40 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: testing-env-image | ||
|
||
on: | ||
push: | ||
paths: | ||
- ./testing/** | ||
- .github/workflows/testing-env-image.yml | ||
branches: | ||
- "master" | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
working-directory: testing | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Login to Packages Container registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- run: echo "TODAY=$(date +"%Y.%m.%d")" >> $GITHUB_ENV | ||
- name: build testing-env:${{env.TODAY}} image | ||
run: | | ||
docker build -t ghcr.io/runatlantis/testing-env:${{env.TODAY}} . | ||
- name: publish testing-env:${{env.TODAY}} image | ||
run: | | ||
docker push ghcr.io/runatlantis/testing-env:${{env.TODAY}} | ||
docker tag ghcr.io/runatlantis/testing-env:${{env.TODAY}} ghcr.io/runatlantis/testing-env:latest | ||
docker push ghcr.io/runatlantis/testing-env:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters