Merge pull request #6 from towerops-app/blacksmith-migration-3dec5fb

.github/workflows: Migrate workflows to Blacksmith runners
This commit is contained in:
Graham McIntire 2026-02-02 13:35:08 -06:00 committed by GitHub
commit 440ba2d44d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -27,7 +27,7 @@ env:
jobs:
test:
name: Test
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout
uses: actions/checkout@v4
@ -67,7 +67,7 @@ jobs:
build-branch:
name: Build (Branch)
needs: test
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
if: github.event_name == 'push' && github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')
permissions:
contents: read
@ -76,8 +76,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Setup Blacksmith Builder
uses: useblacksmith/setup-docker-builder@v1
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
@ -95,7 +95,7 @@ jobs:
echo "name=$SAFE_BRANCH" >> $GITHUB_OUTPUT
- name: Build and push
uses: docker/build-push-action@v6
uses: useblacksmith/build-push-action@v2
with:
context: .
push: true
@ -105,19 +105,11 @@ jobs:
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.branch.outputs.name }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:sha-${{ github.sha }}
cache-from: |
type=gha,scope=build-amd64
type=gha,scope=release-amd64
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:cache-amd64
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
cache-to: |
type=gha,scope=build-amd64,mode=max
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:cache-amd64,mode=max
# Generate version info for release builds
version:
name: Version
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
outputs:
version: ${{ steps.version.outputs.version }}
@ -162,13 +154,13 @@ jobs:
runner: ubuntu-latest
- platform: linux/arm64
arch: arm64
runner: ubuntu-24.04-arm
runner: blacksmith-4vcpu-ubuntu-2404-arm
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Setup Blacksmith Builder
uses: useblacksmith/setup-docker-builder@v1
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
@ -178,7 +170,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
uses: useblacksmith/build-push-action@v2
with:
context: .
platforms: ${{ matrix.platform }}
@ -189,19 +181,12 @@ jobs:
BUILDKIT_INLINE_CACHE=1
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.version.outputs.version }}-${{ matrix.arch }}
cache-from: |
type=gha,scope=release-${{ matrix.arch }}
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:cache-${{ matrix.arch }}
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
cache-to: |
type=gha,scope=release-${{ matrix.arch }},mode=max
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:cache-${{ matrix.arch }},mode=max
# Create multi-arch manifest after both builds complete
manifest:
name: Create Manifest
needs: [version, build-release]
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
permissions:
contents: read