Skip to content

Commit cfc751a

Browse files
committed
Add ARM support
1 parent 958ddaf commit cfc751a

File tree

3 files changed

+55
-47
lines changed

3 files changed

+55
-47
lines changed

.github/workflows/build-latest-release.yaml

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,46 @@ name: build-latest-release
22
on:
33
workflow_dispatch: {}
44
schedule:
5-
- cron: '0 0 * * 0'
5+
- cron: "0 2 * * 2"
66
release:
77
types: [created]
88

99
jobs:
1010
build:
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-24.04
1212
steps:
13-
-
14-
name: Set latest release tag
13+
- name: Set latest release tag
1514
if: github.event_name != 'release'
1615
run: |
1716
echo "RELEASE_TAG=$(curl https://api.github.com/repos/crinis/sourcebans-docker/releases/latest -s | jq -r ".tag_name")" >> $GITHUB_ENV
18-
-
19-
name: Set current release tag
17+
18+
- name: Set current release tag
2019
if: github.event_name == 'release'
2120
run: |
2221
echo "RELEASE_TAG=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
23-
-
24-
name: Checkout
22+
23+
- name: Checkout
2524
uses: actions/checkout@v3
2625
with:
2726
ref: ${{ env.RELEASE_TAG }}
28-
-
29-
name: Login to Docker Hub
30-
uses: docker/login-action@v2
27+
28+
- name: Login to Docker Hub
29+
uses: docker/login-action@v3
3130
with:
3231
username: ${{ secrets.DOCKERHUB_USERNAME }}
3332
password: ${{ secrets.DOCKERHUB_TOKEN }}
34-
-
35-
name: Set up Docker Buildx
36-
uses: docker/setup-buildx-action@v2
37-
-
38-
name: Build and push
39-
uses: docker/build-push-action@v4
33+
34+
- name: Set up QEMU
35+
uses: docker/setup-qemu-action@v3
36+
37+
- name: Set up Docker Buildx
38+
uses: docker/setup-buildx-action@v3
39+
40+
- name: Build and push
41+
uses: docker/build-push-action@v6
4042
with:
4143
context: .
4244
file: ./Dockerfile
4345
push: true
4446
tags: ${{ secrets.DOCKERHUB_USERNAME }}/sourcebans:${{ env.RELEASE_TAG }}, ${{ secrets.DOCKERHUB_USERNAME }}/sourcebans:latest, ${{ secrets.DOCKERHUB_USERNAME }}/sourcebans:${{ github.run_id }}
45-
47+
platforms: linux/amd64, linux/arm64

.github/workflows/build-sb-dev-branch.yaml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,37 @@ name: build-sb-dev-branch
33
on:
44
workflow_dispatch: {}
55
schedule:
6-
- cron: '0 0 * * 0'
6+
- cron: "0 2 * * 2"
77
push:
88
branches:
9-
- 'master'
9+
- "master"
1010

1111
jobs:
1212
build:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-24.04
1414
steps:
15-
-
16-
name: Checkout
15+
- name: Checkout
1716
uses: actions/checkout@v3
18-
-
19-
name: Login to Docker Hub
20-
uses: docker/login-action@v2
17+
18+
- name: Login to Docker Hub
19+
uses: docker/login-action@v3
2120
with:
2221
username: ${{ secrets.DOCKERHUB_USERNAME }}
2322
password: ${{ secrets.DOCKERHUB_TOKEN }}
24-
-
25-
name: Set up Docker Buildx
26-
uses: docker/setup-buildx-action@v2
27-
-
28-
name: Build and push
29-
uses: docker/build-push-action@v4
23+
24+
- name: Set up QEMU
25+
uses: docker/setup-qemu-action@v3
26+
27+
- name: Set up Docker Buildx
28+
uses: docker/setup-buildx-action@v3
29+
30+
- name: Build and push
31+
uses: docker/build-push-action@v6
3032
with:
3133
context: .
3234
file: ./Dockerfile
3335
push: true
3436
tags: ${{ secrets.DOCKERHUB_USERNAME }}/sourcebans:sb-dev, ${{ secrets.DOCKERHUB_USERNAME }}/sourcebans:sb-dev-${{ github.run_id }}
3537
build-args: |
3638
CHECKOUT=php81
39+
platforms: linux/amd64, linux/arm64

.github/workflows/build-sb-latest-release.yaml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,41 @@ name: build-sb-latest-release
33
on:
44
workflow_dispatch: {}
55
schedule:
6-
- cron: '0 0 * * 0'
6+
- cron: "0 0 * * 0"
77
push:
88
branches:
9-
- 'master'
9+
- "master"
1010

1111
jobs:
1212
build:
1313
runs-on: ubuntu-latest
1414
steps:
15-
-
16-
name: Checkout
15+
- name: Checkout
1716
uses: actions/checkout@v3
18-
-
19-
name: Login to Docker Hub
20-
uses: docker/login-action@v2
17+
18+
- name: Login to Docker Hub
19+
uses: docker/login-action@v3
2120
with:
2221
username: ${{ secrets.DOCKERHUB_USERNAME }}
2322
password: ${{ secrets.DOCKERHUB_TOKEN }}
24-
-
25-
name: Set up Docker Buildx
26-
uses: docker/setup-buildx-action@v2
27-
-
28-
name: Get latest Sourcebans release
23+
24+
- name: Set up QEMU
25+
uses: docker/setup-qemu-action@v3
26+
27+
- name: Set up Docker Buildx
28+
uses: docker/setup-buildx-action@v3
29+
30+
- name: Get latest Sourcebans release
2931
run: |
3032
echo "SB_TAG=$(curl https://api.github.com/repos/sbpp/sourcebans-pp/releases -s | jq -r ".[].tag_name" | grep '^1\.7\.[0-9]*$' -m1)" >> $GITHUB_ENV
31-
-
32-
name: Build and push
33-
uses: docker/build-push-action@v4
33+
34+
- name: Build and push
35+
uses: docker/build-push-action@v6
3436
with:
3537
context: .
3638
file: ./Dockerfile
3739
push: true
3840
tags: ${{ secrets.DOCKERHUB_USERNAME }}/sourcebans:sb-${{ env.SB_TAG }}, ${{ secrets.DOCKERHUB_USERNAME }}/sourcebans:sb-latest, ${{ secrets.DOCKERHUB_USERNAME }}/sourcebans:sb-${{ github.run_id }}
3941
build-args: |
4042
CHECKOUT=${{ env.SB_TAG }}
43+
platforms: linux/amd64, linux/arm64

0 commit comments

Comments
 (0)