Skip to content

Commit 5d9fa19

Browse files
Migrate workflows to Blacksmith
1 parent 11c2565 commit 5d9fa19

File tree

2 files changed

+12
-20
lines changed

2 files changed

+12
-20
lines changed

.github/workflows/build-container.yml

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
jobs:
2424
build-amd64:
2525
name: Build container (amd64)
26-
runs-on: ubuntu-24.04
26+
runs-on: blacksmith-4vcpu-ubuntu-2404
2727
outputs:
2828
tag: ${{ steps.prepare.outputs.tag }}
2929
repo: ${{ steps.prepare.outputs.repo }}
@@ -42,8 +42,8 @@ jobs:
4242
echo "tag=${BRANCH_NAME}" >> "$GITHUB_OUTPUT"
4343
echo "repo=${REPO_NAME}" >> "$GITHUB_OUTPUT"
4444
45-
- name: Set up Docker Buildx
46-
uses: docker/setup-buildx-action@v3
45+
- name: Setup Blacksmith Builder
46+
uses: useblacksmith/setup-docker-builder@v1
4747

4848
- name: Login to GitHub Container Registry
4949
uses: docker/login-action@v3
@@ -54,22 +54,18 @@ jobs:
5454

5555
- name: Build and push Docker image
5656
id: build
57-
uses: docker/build-push-action@v6
57+
uses: useblacksmith/build-push-action@v2
5858
with:
5959
context: ${{ inputs.context }}
6060
file: ${{ inputs.file }}
6161
push: true
6262
platforms: linux/amd64
6363
tags: |
6464
ghcr.io/${{ steps.prepare.outputs.repo }}/${{ inputs.name }}:${{ hashFiles(inputs.file) }}-amd64
65-
cache-from: |
66-
type=registry,ref=ghcr.io/${{ steps.prepare.outputs.repo }}/${{ inputs.name }}:${{ hashFiles(inputs.file) }}-amd64
67-
type=registry,ref=ghcr.io/${{ steps.prepare.outputs.repo }}/${{ inputs.name }}:${{ steps.prepare.outputs.tag }}
68-
cache-to: type=inline
6965
7066
build-arm64:
7167
name: Build container (arm64)
72-
runs-on: ubuntu-24.04-arm
68+
runs-on: blacksmith-4vcpu-ubuntu-2404-arm
7369
outputs:
7470
digest: ${{ steps.build.outputs.digest }}
7571
steps:
@@ -86,8 +82,8 @@ jobs:
8682
echo "tag=${BRANCH_NAME}" >> "$GITHUB_OUTPUT"
8783
echo "repo=${REPO_NAME}" >> "$GITHUB_OUTPUT"
8884
89-
- name: Set up Docker Buildx
90-
uses: docker/setup-buildx-action@v3
85+
- name: Setup Blacksmith Builder
86+
uses: useblacksmith/setup-docker-builder@v1
9187

9288
- name: Login to GitHub Container Registry
9389
uses: docker/login-action@v3
@@ -98,31 +94,27 @@ jobs:
9894

9995
- name: Build and push Docker image
10096
id: build
101-
uses: docker/build-push-action@v6
97+
uses: useblacksmith/build-push-action@v2
10298
with:
10399
context: ${{ inputs.context }}
104100
file: ${{ inputs.file }}
105101
push: true
106102
platforms: linux/arm64
107103
tags: |
108104
ghcr.io/${{ steps.prepare.outputs.repo }}/${{ inputs.name }}:${{ hashFiles(inputs.file) }}-arm64
109-
cache-from: |
110-
type=registry,ref=ghcr.io/${{ steps.prepare.outputs.repo }}/${{ inputs.name }}:${{ hashFiles(inputs.file) }}-arm64
111-
type=registry,ref=ghcr.io/${{ steps.prepare.outputs.repo }}/${{ inputs.name }}:${{ steps.prepare.outputs.tag }}
112-
cache-to: type=inline
113105
114106
create-manifest:
115107
name: Create multi-arch manifest
116-
runs-on: ubuntu-24.04-arm
108+
runs-on: blacksmith-4vcpu-ubuntu-2404-arm
117109
needs: [build-amd64, build-arm64]
118110
steps:
119111
- name: Checkout code
120112
uses: actions/checkout@v4
121113
with:
122114
ref: ${{ github.event.pull_request.head.sha }}
123115

124-
- name: Set up Docker Buildx
125-
uses: docker/setup-buildx-action@v3
116+
- name: Setup Blacksmith Builder
117+
uses: useblacksmith/setup-docker-builder@v1
126118

127119
- name: Login to GitHub Container Registry
128120
uses: docker/login-action@v3

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ concurrency:
2020
jobs:
2121
check-skip:
2222
name: Check skip conditions
23-
runs-on: ubuntu-latest
23+
runs-on: blacksmith-4vcpu-ubuntu-2404
2424
outputs:
2525
skip: ${{ steps.skip-check.outputs.skip }}
2626
steps:

0 commit comments

Comments
 (0)