get release tag in env instead

This commit is contained in:
Ashley Harrison
2026-01-14 14:41:46 +00:00
parent 9eec5a0321
commit 32bd9a977d
+3 -1
View File
@@ -66,10 +66,12 @@ jobs:
# "canary" on pushes to main
- name: Create deploy name
id: create-deploy-name
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
run: |
if [[ "${{ github.event_name }}" == "release" ]]; then
LATEST_RELEASE_TAG=$(curl -s "https://api.github.com/repos/grafana/grafana/releases/latest" | jq -r '.tag_name')
if [[ "${{ github.event.release.tag_name }}" == "$LATEST_RELEASE_TAG" ]]; then
if [[ "$RELEASE_TAG" == "$LATEST_RELEASE_TAG" ]]; then
echo "deploy-name=latest" >> "$GITHUB_OUTPUT"
exit 0
fi