Skip to content

Commit 5ed6922

Browse files
authored
fix: use separate step to extract image tag (#324)
1 parent 43bc281 commit 5ed6922

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/docker.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ jobs:
5656
fi
5757
echo "VERSION=$TAG" >> $GITHUB_OUTPUT
5858
59+
- name: Extract image tag from version
60+
id: image-tag
61+
run: |
62+
# Extract the image tag from the version
63+
echo "IMAGE_TAG=${IMAGE_TAG#v}" >> $GITHUB_OUTPUT
64+
5965
- name: Install dependencies
6066
run: |
6167
sudo apt-get update && sudo apt-get install -y jq
@@ -68,7 +74,7 @@ jobs:
6874
# Update the server.json with the correct Docker image reference
6975
# (note the image tag does not include the "v" prefix)
7076
jq --arg version "${{ steps.version.outputs.VERSION }}" \
71-
--arg image "grafana/mcp-grafana:${{ steps.version.outputs.VERSION#v }}" \
77+
--arg image "grafana/mcp-grafana:${{ steps.image-tag.outputs.IMAGE_TAG }}" \
7278
'.packages[0].version = $version |
7379
.packages[0].identifier = $image |
7480
.version = $version' server.json > server.json.tmp

0 commit comments

Comments
 (0)