Skip to content

Commit

Permalink
Update release GitHub action to deploy to DockerHub
Browse files Browse the repository at this point in the history
The release pipeline now should build and push the c2g image to DockerHub
when building a tag, tagging the image with the tag's version number
as well as with "latest".
  • Loading branch information
tomasfarias committed May 1, 2021
1 parent 6c8de1b commit da9ca08
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/workflows/release_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,21 @@ jobs:
files: 'c2g*'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Get tag
uses: olegtarasov/[email protected]
with:
tagRegex: "v(.*)"
tagRegexGroup: 1

- name: Docker build and push
uses: docker/build-push-action@v2
with:
push: true
tags: tomasfarias/c2g:${{ GIT_TAG_NAME }},tomasfarias/c2g:latest
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit da9ca08

Please sign in to comment.