Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
6 changes: 3 additions & 3 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ env:
REGISTRY_GITHUB: ghcr.io
REGISTRY_DOCKERHUB: docker.io
IMAGE_NAME: appwrite/mcp
TAG: ${{ github.event.release.tag_name || github.sha }}
TAG: ${{ github.event.release.tag_name }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Empty TAG on workflow_dispatch triggers

The || github.sha fallback was removed alongside the file rename, but this workflow still supports manual workflow_dispatch runs. When triggered that way, github.event.release.tag_name is empty, so TAG becomes an empty string. This causes the Docker build step to push an image tagged "", and the yq step to write an empty string into default.yaml's image.tag field — silently corrupting the declarative config in the assets repo. The original code handled this correctly; the fallback should be restored.

Suggested change
TAG: ${{ github.event.release.tag_name }}
TAG: ${{ github.event.release.tag_name || github.sha }}


jobs:
build:
Expand Down Expand Up @@ -73,13 +73,13 @@ jobs:
token: ${{ steps.app-token.outputs.token }}

- name: Update image tag
run: yq -i '.["mcp"].image.tag = strenv(TAG)' ${{ env.ENVIRONMENT }}/${{ env.PROJECT }}/fra1.yaml
run: yq -i '.["mcp"].image.tag = strenv(TAG)' ${{ env.ENVIRONMENT }}/${{ env.PROJECT }}/default.yaml

- name: Commit and push
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add ${{ env.ENVIRONMENT }}/${{ env.PROJECT }}/fra1.yaml
git add ${{ env.ENVIRONMENT }}/${{ env.PROJECT }}/default.yaml
if git diff --cached --quiet; then
echo "No changes to commit"
else
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ jobs:
token: ${{ steps.app-token.outputs.token }}

- name: Update image tag
run: yq -i '.["mcp"].image.tag = strenv(TAG)' ${{ env.ENVIRONMENT }}/${{ env.PROJECT }}/fra1.yaml
run: yq -i '.["mcp"].image.tag = strenv(TAG)' ${{ env.ENVIRONMENT }}/${{ env.PROJECT }}/default.yaml

- name: Commit and push
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add ${{ env.ENVIRONMENT }}/${{ env.PROJECT }}/fra1.yaml
git add ${{ env.ENVIRONMENT }}/${{ env.PROJECT }}/default.yaml
if git diff --cached --quiet; then
echo "No changes to commit"
else
Expand Down
Loading