-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update release GitHub action to deploy to DockerHub
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
1 parent
6c8de1b
commit da9ca08
Showing
2 changed files
with
19 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.