-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the workflows so that we can auto release a new major version (#336)
- Loading branch information
1 parent
f16a44d
commit 2b014d9
Showing
5 changed files
with
74 additions
and
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Build, Tag & Push a new release to dockerhub off of a new pushed tag or gh_grpc_release.yml workflow | ||
|
||
name: Docker Release | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
release_version: | ||
required: true | ||
type: string | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+_[0-9]+' | ||
|
||
|
||
jobs: | ||
docker_release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- uses: nelonoel/[email protected] | ||
|
||
- name: Docker Login | ||
env: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USER }} | ||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | ||
run: docker login --username "$DOCKERHUB_USERNAME" --password "$DOCKERHUB_TOKEN" | ||
|
||
- name: Get Version | ||
id: get_version | ||
run: | | ||
version="" | ||
if [[ ${{ github.event_name }} == "pull_request" ]]; then | ||
version=${{ inputs.release_version }} | ||
fi | ||
if [[ ${{ github.event_name }} == "push" ]]; then | ||
version=${GITHUB_REF#refs/*/} | ||
fi | ||
# Strip "v" prefix from tag name and set to output var | ||
echo ::set-output name=version::${version#v} | ||
- name: Build and Tag | ||
if: success() | ||
env: | ||
VERSION: ${{ steps.get_version.outputs.version }} | ||
run: make tag-latest | ||
|
||
- name: Push | ||
if: success() | ||
env: | ||
VERSION: ${{ steps.get_version.outputs.version }} | ||
run: make push-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
This file was deleted.
Oops, something went wrong.
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