Skip to content

Commit

Permalink
Add improved workflow for pushing Docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
andyone committed May 28, 2022
1 parent 9b016e8 commit 837e3be
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,21 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout the latest tag
run: |
rev=$(git rev-list --tags --max-count=1)
tag=$(git describe --tags "$rev")
if [[ -z "$tag" ]] ; then
echo "::error::Can't find the latest tag"
exit 1
fi
echo -e "\033[34mRev:\033[0m $rev"
echo -e "\033[34mTag:\033[0m $tag"
git checkout "$tag"
- name: Prepare metadata for build
id: metadata
run: |
Expand Down

0 comments on commit 837e3be

Please sign in to comment.