Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating release action to pull correct version tag from release branch. #567

Merged
merged 7 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions .github/workflows/release-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
- name: Fetching the Latest Release Tag number
id: releaseVersion
run: |
release_json=$(curl https://api.github.com/repos/${{ github.repository }}/releases)
release_tag=$(echo "$release_json" | jq -r '.[0].tag_name')
echo "release_tag: Latest Tag is : $release_tag"
echo "release_tag=$release_tag" >> $GITHUB_OUTPUT
GIT_RELEASE=$(echo ${{ github.ref_name }} | cut -d'/' -f 2)
echo "GIT_RELEASE=$GIT_RELEASE" >> $GITHUB_ENV
echo "release_tag: Latest Tag is : $GIT_RELEASE"
echo "release_tag=$GIT_RELEASE" >> $GITHUB_OUTPUT

- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -48,11 +48,7 @@ jobs:
images: |
ghcr.io/${{ github.repository }}/${{ inputs.image }}
tags: |
type=raw,latest
type=raw,release
type=pep440,pattern={{version}},value=${{ steps.releaseVersion.outputs.release_tag }}
type=pep440,pattern={{major}}.{{minor}},value=${{ steps.releaseVersion.outputs.release_tag }}
type=pep440,pattern={{major}},value=${{ steps.releaseVersion.outputs.release_tag }}
type=semver,pattern={{version}},value=${{ steps.releaseVersion.outputs.release_tag }}
type=sha,format=long

- name: Build and push Docker images
Expand All @@ -73,10 +69,10 @@ jobs:
- name: Fetching the Latest Release Tag number
id: releaseVersion
run: |
release_json=$(curl https://api.github.com/repos/${{ github.repository }}/releases)
release_tag=$(echo "$release_json" | jq -r '.[0].tag_name')
echo "release_tag: Latest Tag is : $release_tag"
echo "release_tag=$release_tag" >> $GITHUB_OUTPUT
GIT_RELEASE=$(echo ${{ github.ref_name }} | cut -d'/' -f 2)
echo "GIT_RELEASE=$GIT_RELEASE" >> $GITHUB_ENV
echo "release_tag: Latest Tag is : $GIT_RELEASE"
echo "release_tag=$GIT_RELEASE" >> $GITHUB_OUTPUT

- name: Checkout code
uses: actions/checkout@v2
Expand Down
Loading
Loading