-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from topfreegames/feat/aws-cli-v2
Update binaries and uses aws-cli v2
- Loading branch information
Showing
3 changed files
with
101 additions
and
29 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,45 @@ | ||
name: Publish new Docker image | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
dockerhub-build-push: | ||
name: DockerHub Build and Push | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Get the current release version | ||
id: vars | ||
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10}) | ||
- name: Build the Docker image | ||
run: docker build . --file Dockerfile --tag tfgco/iac-ci:latest | ||
- name: Login to DockerHub Registry | ||
run: echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin | ||
- name: Push the latest Docker image | ||
run: docker push tfgco/iac-ci:latest | ||
- name: Tag the release Docker image | ||
run: docker tag tfgco/iac-ci:latest tfgco/iac-ci:${{steps.vars.outputs.tag}} | ||
- name: Push the tagged release Docker image | ||
run: docker push tfgco/iac-ci:${{steps.vars.outputs.tag}} | ||
quayio-build-push: | ||
name: Quay.io Build and Push | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Get the current release version | ||
id: vars | ||
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10}) | ||
- name: Build the Docker image | ||
run: docker build . --file Dockerfile --tag quay.io/tfgco/iac-ci:latest | ||
- name: Login to Quay.io Registry | ||
run: echo ${{ secrets.QUAYIO_TOKEN }} | docker login -u ${{ secrets.QUAYIO_USERNAME }} --password-stdin quay.io | ||
- name: Push the latest Docker image | ||
run: docker push quay.io/tfgco/iac-ci:latest | ||
- name: Tag the release Docker image | ||
run: docker tag quay.io/tfgco/iac-ci:latest quay.io/tfgco/iac-ci:${{steps.vars.outputs.tag}} | ||
- name: Push the tagged release Docker image | ||
run: docker push quay.io/tfgco/iac-ci:${{steps.vars.outputs.tag}} |