Compare commits

...

3 Commits

Author SHA1 Message Date
c00111cff1 Merge pull request 'fix(ci): pass Go image tag from build to gitops via artifact' (#41) from fix/gitops-pass-tag-via-artifact into main
Some checks failed
Deploy to K8s / deploy (push) Successful in 8s
Build and Push / build (push) Successful in 7s
Build and Push / build-go (push) Failing after 42s
Reviewed-on: #41
2026-06-12 19:53:19 +02:00
d263d8a534 fix(ci): pass Go image tag from build to gitops via artifact
All checks were successful
Deploy to K8s / deploy (push) Successful in 14s
github.event.workflow_run.head_branch is not populated for tag pushes
in Gitea Actions, causing the image tag to resolve to empty (-go suffix
with no version). Fix: build-go uploads the full image reference as a
one-line artifact; gitops-update downloads it via download-artifact@v4
with run-id from the workflow_run event.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 19:52:02 +02:00
af030c8255 Merge pull request 'fix(ci): separate git credentials from --git-repo URL to fix tea pr create' (#40) from fix/gitops-tea-url into main
All checks were successful
Deploy to K8s / deploy (push) Successful in 10s
Build and Push / build (push) Successful in 42s
Build and Push / build-go (push) Successful in 1m23s
Reviewed-on: #40
2026-06-12 19:39:31 +02:00
2 changed files with 18 additions and 4 deletions

View File

@@ -63,3 +63,11 @@ jobs:
--build-arg BUILD_DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ) \ --build-arg BUILD_DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ) \
-t $IMAGE go/ -t $IMAGE go/
docker push $IMAGE docker push $IMAGE
echo "$IMAGE" > /tmp/go-image-tag.txt
- name: Upload Go image tag for gitops workflow
uses: actions/upload-artifact@v4
with:
name: go-image-tag
path: /tmp/go-image-tag.txt
retention-days: 1

View File

@@ -58,16 +58,22 @@ jobs:
-o /usr/local/bin/uh-cli -o /usr/local/bin/uh-cli
chmod +x /usr/local/bin/uh-cli chmod +x /usr/local/bin/uh-cli
- name: Download image tag artifact (workflow_run trigger)
if: github.event_name == 'workflow_run'
uses: actions/download-artifact@v4
with:
name: go-image-tag
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Resolve image tag - name: Resolve image tag
id: resolve id: resolve
run: | run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
GIT_TAG="${{ inputs.tag }}" IMAGE="gitea.home.hrajfrisbee.cz/${{ github.repository }}:${{ inputs.tag }}-go"
else else
# workflow_run: use the ref name of the triggering workflow (the pushed git tag). IMAGE="$(cat go-image-tag.txt)"
GIT_TAG="${{ github.event.workflow_run.head_branch }}"
fi fi
IMAGE="gitea.home.hrajfrisbee.cz/${{ github.repository }}:${GIT_TAG}-go"
echo "image=${IMAGE}" >> "$GITHUB_OUTPUT" echo "image=${IMAGE}" >> "$GITHUB_OUTPUT"
echo "Resolved image: ${IMAGE}" echo "Resolved image: ${IMAGE}"