3d9a09496d
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>
60 lines
1.8 KiB
YAML
60 lines
1.8 KiB
YAML
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 }}"
|