From b958da984cca93552a6456aef5e114576ef6d69a Mon Sep 17 00:00:00 2001 From: Test Date: Sun, 6 Sep 2026 23:12:30 -0700 Subject: [PATCH] fix: standardize poimen-workflows CI to unified pattern Unified pattern enforced: - test job: runs on all branches + PRs - build-push job: only on main push, depends on test - Proper env vars (GOPRIVATE, REGISTRY, IMAGE) - Install Node.js before checkout - Install docker only in build-push - Docker login + build + push + prune --- .gitea/workflows/ci.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 2fa621f..1618625 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -41,14 +41,18 @@ jobs: runs-on: golang steps: - name: Install Node.js and Docker - run: apt-get update && apt-get install -y nodejs docker.io + run: | + apt-get update + apt-get install -y nodejs docker.io - name: Checkout code uses: actions/checkout@v4 - name: Get short SHA id: sha - run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + run: | + SHORT_SHA=$(git rev-parse --short HEAD) + echo "short_sha=${SHORT_SHA}" >> $GITHUB_OUTPUT - name: Registry login run: | @@ -58,7 +62,7 @@ jobs: REGISTRY_USER: ${{ secrets.FORGEJO_REGISTRY_USER }} REGISTRY_TOKEN: ${{ secrets.FORGEJO_REGISTRY_TOKEN }} - - name: Build and push image + - name: Build Docker image run: | docker build --no-cache \ -t "${IMAGE}:${{ steps.sha.outputs.short_sha }}" \ -- 2.54.0