fix(actions): use per-step status in workflow job API response; add build workflow
Build & Push Gitea image / build-push (push) Failing after 2m20s

ToActionWorkflowJob was calling ToActionsStatus(job.Status) for every
step, making each step reflect the whole job conclusion instead of its
own state. Replace the inline loop with the existing ToActionWorkflowStep
helper which correctly uses step.Status.

Add .gitea/workflows/build-push.yaml to build and push a Docker image to
Artifact Registry on push to this branch, enabling deployment to GKE.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-07 18:46:18 -05:00
parent bb6faa4c5d
commit 3d9a09496d
2 changed files with 60 additions and 9 deletions
+59
View File
@@ -0,0 +1,59 @@
name: Build & Push Gitea image
on:
push:
branches:
- feat/workflow-step-events
workflow_dispatch:
jobs:
build-push:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Authenticate to GCP
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Set up gcloud
uses: google-github-actions/setup-gcloud@v2
with:
project_id: neuron-785695
- name: Configure Docker for Artifact Registry
run: gcloud auth configure-docker us-central1-docker.pkg.dev --quiet
- name: Set image tag
id: tag
run: |
SHA="${GITHUB_SHA:0:8}"
echo "tag=us-central1-docker.pkg.dev/neuron-785695/neuron-ci/gitea:${SHA}" >> "$GITHUB_OUTPUT"
echo "latest=us-central1-docker.pkg.dev/neuron-785695/neuron-ci/gitea:latest" >> "$GITHUB_OUTPUT"
echo "SHA=${SHA}" >> "$GITHUB_OUTPUT"
- name: Build Gitea image
run: |
docker build \
--build-arg GITEA_VERSION="neuron-$(git rev-parse --short HEAD)" \
--build-arg TAGS="sqlite sqlite_unlock_notify" \
-t "${{ steps.tag.outputs.tag }}" \
-t "${{ steps.tag.outputs.latest }}" \
.
- name: Push Gitea image
run: |
docker push "${{ steps.tag.outputs.tag }}"
docker push "${{ steps.tag.outputs.latest }}"
echo "Pushed gitea:${{ steps.tag.outputs.SHA }} and :latest"
- name: Output image tag
run: |
echo "::notice title=Image pushed::${{ steps.tag.outputs.tag }}"
echo "Update deployment.yaml image to: ${{ steps.tag.outputs.tag }}"
+1 -9
View File
@@ -405,15 +405,7 @@ func ToActionWorkflowJob(ctx context.Context, repo *repo_model.Repository, task
runnerName = runner.Name
}
for i, step := range task.Steps {
stepStatus, stepConclusion := ToActionsStatus(job.Status)
steps = append(steps, &api.ActionWorkflowStep{
Name: step.Name,
Number: int64(i),
Status: stepStatus,
Conclusion: stepConclusion,
StartedAt: step.Started.AsTime().UTC(),
CompletedAt: step.Stopped.AsTime().UTC(),
})
steps = append(steps, ToActionWorkflowStep(step, i))
}
}
}