-
Notifications
You must be signed in to change notification settings - Fork 488
61 lines (61 loc) · 1.82 KB
/
build.yaml
File metadata and controls
61 lines (61 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: build
'on':
schedule:
-
cron: '0 0 * * 2'
push: null
pull_request:
branches:
- master
workflow_dispatch: null
jobs:
toolbox_latest:
name: 'webdevops/toolbox:latest'
runs-on: ubuntu-latest
container: webdevops/dockerfile-build-env
steps:
-
run: apt update && apt install sudo
-
uses: actions/checkout@v4
-
uses: docker/setup-docker-action@v4
with:
daemon-config: '{"features": {"containerd-snapshotter": true}}'
-
uses: docker/setup-qemu-action@v3
-
name: 'Build x64 & ARM'
uses: docker/build-push-action@v6
with:
context: docker/toolbox/latest
tags: 'ghcr.io/webdevops/toolbox:latest,webdevops/toolbox:latest'
platforms: linux/amd64,linux/arm64
-
run: |-
docker image inspect --platform linux/amd64 webdevops/toolbox:latest
docker image inspect --platform linux/arm64 webdevops/toolbox:latest
-
# if: "${{github.ref == 'refs/heads/master'}}"
name: 'Login to ghcr.io'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: '${{ github.actor }}'
password: '${{ secrets.GITHUB_TOKEN }}'
-
# if: "${{github.ref == 'refs/heads/master'}}"
name: 'Login to hub.docker.com'
uses: docker/login-action@v3
with:
username: '${{ secrets.DOCKERHUB_USERNAME }}'
password: '${{ secrets.DOCKERHUB_TOKEN }}'
-
# if: "${{github.ref == 'refs/heads/master'}}"
name: Push
uses: docker/build-push-action@v6
with:
context: docker/toolbox/latest
push: true
tags: 'ghcr.io/webdevops/toolbox:latest,webdevops/toolbox:latest'
platforms: linux/amd64,linux/arm64