fix(ci): pass Go image tag from build to gitops via artifact #41

Merged
kacerr merged 1 commits from fix/gitops-pass-tag-via-artifact into main 2026-06-12 19:53:20 +02:00
Owner

Problem

github.event.workflow_run.head_branch is not populated for tag pushes in Gitea Actions (it's empty), so the image resolved to ...:⁻go with no version.

Fix

build.yaml — at the end of the build-go job, write the full image reference to /tmp/go-image-tag.txt and upload it as a go-image-tag artifact (1-day retention).

gitops-update.yaml — when triggered by workflow_run, download that artifact via actions/download-artifact@v4 with run-id: ${{ github.event.workflow_run.id }}, then read the image from go-image-tag.txt. The workflow_dispatch path is unchanged.

## Problem `github.event.workflow_run.head_branch` is not populated for tag pushes in Gitea Actions (it's empty), so the image resolved to `...:⁻go` with no version. ## Fix **`build.yaml`** — at the end of the `build-go` job, write the full image reference to `/tmp/go-image-tag.txt` and upload it as a `go-image-tag` artifact (1-day retention). **`gitops-update.yaml`** — when triggered by `workflow_run`, download that artifact via `actions/download-artifact@v4` with `run-id: ${{ github.event.workflow_run.id }}`, then read the image from `go-image-tag.txt`. The `workflow_dispatch` path is unchanged.
kacerr added 1 commit 2026-06-12 19:52:10 +02:00
fix(ci): pass Go image tag from build to gitops via artifact
All checks were successful
Deploy to K8s / deploy (push) Successful in 14s
d263d8a534
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>
kacerr merged commit c00111cff1 into main 2026-06-12 19:53:20 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kacerr/fuj-management#41