From a5f42a3e304049218a76ab2414005ce6783ebb6c Mon Sep 17 00:00:00 2001 From: Mike Johnston Date: Tue, 23 Sep 2025 22:39:28 -0400 Subject: [PATCH] fix branch and fetch stack details --- .gitea/workflows/immich.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/immich.yaml b/.gitea/workflows/immich.yaml index 4446cc5..b13180d 100644 --- a/.gitea/workflows/immich.yaml +++ b/.gitea/workflows/immich.yaml @@ -18,7 +18,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - ref: stage + ref: main - name: Get the endpoint ID # Usually ID is 1, but you can get it from the API. Only skip this if you are VERY sure. @@ -34,10 +34,16 @@ jobs: echo "STACK_ID=$STACK_ID" >> $GITHUB_ENV echo "Got stack ID: $STACK_ID matched with Endpoint ID: $ENDPOINT_ID" + - name: Fetch Stack + run: | + # Get the stack details (including stack file content) + curl -s -H "X-API-Key: $PORTAINER_TOKEN" "$PORTAINER_API_URL/stacks/$STACK_ID/file" \ + | jq -r '.StackFileContent' > stack.yml + - name: Update stack in Portainer run: | # Read stack file content - STACK_FILE_CONTENT=$(echo "$(