From be7eabb9b3c95b06b0fb09361a043cebe429b7a5 Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 27 May 2026 13:21:42 +0200 Subject: [PATCH] ci: move build-mage prep job out of test.yml into release.yml build_mage_bin is only consumed by publish-repos in release.yml, so it doesn't belong in the test workflow. Move it to release.yml as a prep job and add it to publish-repos's needs list. --- .github/workflows/release.yml | 35 +++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 34 ---------------------------------- 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4cd0347ae..910be41fd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,40 @@ on: workflow_call: jobs: + build-mage: + runs-on: ubuntu-latest + name: prepare-build-mage + steps: + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 + - name: Set up Go + uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6 + with: + go-version: stable + - name: Cache build mage + id: cache-build-mage + uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5 + with: + key: ${{ runner.os }}-build-mage-build-${{ hashFiles('build/magefile.go') }} + path: | + ./build/build-mage-static + # Statically compile build/magefile.go so publish-repos can run repo + # metadata targets inside ubuntu/fedora/archlinux containers without + # needing a Go toolchain available there. + - name: Install mage + if: ${{ steps.cache-build-mage.outputs.cache-hit != 'true' }} + run: go install github.com/magefile/mage@v1.17.2 + - name: Compile build mage + if: ${{ steps.cache-build-mage.outputs.cache-hit != 'true' }} + working-directory: build + run: | + export PATH=$PATH:$GOPATH/bin + mage -compile ./build-mage-static + - name: Store build mage binary + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6 + with: + name: build_mage_bin + path: ./build/build-mage-static + docker: runs-on: namespace-profile-default steps: @@ -175,6 +209,7 @@ jobs: publish-repos: runs-on: ubuntu-latest needs: + - build-mage - os-package - veans-os-package - desktop diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1109b5a96..65e0bff12 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,40 +32,6 @@ jobs: name: mage_bin path: ./mage-static - build-mage: - runs-on: ubuntu-latest - name: prepare-build-mage - steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 - - name: Set up Go - uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6 - with: - go-version: stable - - name: Cache build mage - id: cache-build-mage - uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5 - with: - key: ${{ runner.os }}-build-mage-build-${{ hashFiles('build/magefile.go') }} - path: | - ./build/build-mage-static - # Statically compile build/magefile.go so publish-repos can run repo - # metadata targets inside ubuntu/fedora/archlinux containers without - # needing a Go toolchain available there. - - name: Install mage - if: ${{ steps.cache-build-mage.outputs.cache-hit != 'true' }} - run: go install github.com/magefile/mage@v1.17.2 - - name: Compile build mage - if: ${{ steps.cache-build-mage.outputs.cache-hit != 'true' }} - working-directory: build - run: | - export PATH=$PATH:$GOPATH/bin - mage -compile ./build-mage-static - - name: Store build mage binary - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6 - with: - name: build_mage_bin - path: ./build/build-mage-static - api-build: runs-on: ubuntu-latest needs: mage