From 20f81f90eb7ec48ea559fa5dec74e82c2e18100e Mon Sep 17 00:00:00 2001 From: Timo Behrendt Date: Sat, 16 May 2026 20:15:46 +0200 Subject: [PATCH] ci: fix ref to local workflows --- .gitea/actions/go-cache-key/action.yaml | 1 - .gitea/workflows/ci.yaml | 64 +++++-------------- .gitea/workflows/install-go-dependencies.yaml | 15 +++-- .gitea/workflows/run-go-script.yaml | 11 ++-- 4 files changed, 33 insertions(+), 58 deletions(-) diff --git a/.gitea/actions/go-cache-key/action.yaml b/.gitea/actions/go-cache-key/action.yaml index 929e530..7d393e8 100644 --- a/.gitea/actions/go-cache-key/action.yaml +++ b/.gitea/actions/go-cache-key/action.yaml @@ -14,4 +14,3 @@ runs: id: hash-go run: | echo "hash=$(sha256sum go.mod go.sum | sha256sum | cut -d' ' -f1)" >> "$GITHUB_OUTPUT" - echo "hash=$hash" >> "$GITHUB_OUTPUT" diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index f74412e..70d8636 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -9,73 +9,41 @@ env: jobs: install-dependencies: - name: install dependencies - runs-on: - - ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Install dependencies - uses: .gitea/workflows/install-go-dependencies + uses: ./.gitea/workflows/install-go-dependencies.yaml build-check: name: build check - runs-on: - - ubuntu-latest needs: install-dependencies - steps: - - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Run build script - uses: .gitea/workflows/run-go-script - with: - script: build + uses: ./.gitea/workflows/run-go-script.yaml + with: + script: build check-format: name: check format - runs-on: - - ubuntu-latest - needs: build-check - steps: - - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Run check format script - uses: .gitea/workflows/run-go-script - with: - script: check-format + needs: install-dependencies + uses: ./.gitea/workflows/run-go-script.yaml + with: + script: check-format check-lint: name: check lint - runs-on: - - ubuntu-latest - needs: build-check - steps: - - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Run check lint script - uses: .gitea/workflows/run-go-script - with: - script: check-lint + needs: install-dependencies + uses: ./.gitea/workflows/run-go-script.yaml + with: + script: lint test: name: test - runs-on: - - ubuntu-latest - needs: build-check - steps: - - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Run test script - uses: .gitea/workflows/run-go-script - with: - script: test + needs: install-dependencies + uses: ./.gitea/workflows/run-go-script.yaml + with: + script: test image-check: name: image check runs-on: - ubuntu-latest - linux_amd64 - needs: build-check steps: - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 diff --git a/.gitea/workflows/install-go-dependencies.yaml b/.gitea/workflows/install-go-dependencies.yaml index 90ddd67..4d200cb 100644 --- a/.gitea/workflows/install-go-dependencies.yaml +++ b/.gitea/workflows/install-go-dependencies.yaml @@ -5,17 +5,20 @@ on: jobs: install-dependencies: - runs-on: ubuntu-latest + runs-on: + - ubuntu-latest + - linux_amd64 steps: - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Setup go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0.4.0 + uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: go-version-file: go.mod check-latest: true - name: Create cache key - uses: .gitea/actions/go-cache-key@main + id: go-cache-key + uses: ./.gitea/actions/go-cache-key - name: cache go id: cache-go uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 @@ -23,6 +26,8 @@ jobs: path: | /go_path /go_cache - key: go_path-${{ steps.hash-go.outputs.hash }} + key: go_path-${{ steps.go-cache-key.outputs.hash }} restore-keys: |- - go_cache-${{ steps.hash-go.outputs.hash }} + go_cache-${{ steps.go-cache-key.outputs.hash }} + - name: Download dependencies + run: go mod download diff --git a/.gitea/workflows/run-go-script.yaml b/.gitea/workflows/run-go-script.yaml index 53b7172..f481755 100644 --- a/.gitea/workflows/run-go-script.yaml +++ b/.gitea/workflows/run-go-script.yaml @@ -10,7 +10,9 @@ on: jobs: run-script: - runs-on: ubuntu-latest + runs-on: + - ubuntu-latest + - linux_amd64 steps: - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -20,7 +22,8 @@ jobs: go-version-file: go.mod check-latest: true - name: Create cache key - uses: .gitea/actions/go-cache-key@main + id: go-cache-key + uses: ./.gitea/actions/go-cache-key - name: Install dependencies from Cache id: cache-go uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 @@ -28,8 +31,8 @@ jobs: path: | /go_path /go_cache - key: go_path-${{ steps.hash-go.outputs.hash }} + key: go_path-${{ steps.go-cache-key.outputs.hash }} restore-keys: |- - go_cache-${{ steps.hash-go.outputs.hash }} + go_cache-${{ steps.go-cache-key.outputs.hash }} - name: Run script run: make ${{ inputs.script }}