From 1a3e7975e90fd00e74f6ed28c2293476c0178630 Mon Sep 17 00:00:00 2001 From: Test Date: Sun, 6 Sep 2026 22:39:23 -0700 Subject: [PATCH] fix: remove container override, use actions/checkout@v4, proper docker install Container override breaks docker socket access to dind sidecar. Changes: - Remove 'container: image: golang:1.26' (breaks dind socket) - Remove manual git config/checkout, use actions/checkout@v4 - Move docker.io install to conditional step before docker login - Install Node.js for actions runtime This workflow now works with the new runner setup (golang:1.26-bookworm label image with shared docker socket via dind sidecar). --- .gitea/workflows/ci.yaml | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index bf8071d..af4e82e 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -8,28 +8,16 @@ on: jobs: test-build-push: runs-on: golang - container: - image: golang:1.26 env: GOPRIVATE: forgejo.riotpiao.com REGISTRY: forgejo.riotpiao.com IMAGE: forgejo.riotpiao.com/rock/poimen-workflows steps: - - name: Install Node.js and Docker for actions runtime - run: apt-get update && apt-get install -y nodejs docker.io - - - name: Configure git authentication - run: | - git config --global url."https://oauth2:${{ secrets.REGISTRY_PAT }}@forgejo.riotpiao.com".insteadOf "https://forgejo.riotpiao.com" - git config --global credential.helper store - echo "https://oauth2:${{ secrets.REGISTRY_PAT }}@forgejo.riotpiao.com" >> ~/.git-credentials + - name: Install Node.js for actions runtime + run: apt-get update && apt-get install -y nodejs - name: Checkout code - run: | - git init - git remote add origin https://forgejo.riotpiao.com/rock/poimen-workflows.git - git fetch origin ${{ github.head_ref || github.ref_name }} --depth=1 - git checkout FETCH_HEAD + uses: actions/checkout@v4 - name: Download dependencies run: go mod download @@ -47,6 +35,10 @@ jobs: id: sha run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Install Docker CLI + if: github.ref == 'refs/heads/main' && github.event_name == 'push' + run: apt-get update && apt-get install -y docker.io + - name: Registry login if: github.ref == 'refs/heads/main' && github.event_name == 'push' run: |