1
+ name : Publish to DockerHub Manually
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ git-ref :
7
+ description : ' Git ref to build (tag/commit)'
8
+ required : true
9
+ default : ' refs/tags/v0.0.0'
10
+
11
+ jobs :
12
+ build_docker :
13
+ name : Build Docker image on Ubuntu
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - uses : actions/checkout@v4
17
+ - name : Setup Node.js
18
+ uses : actions/setup-node@v4
19
+ with :
20
+ node-version : 20
21
+ - name : Install dependencies and build
22
+ run : npm i -f; npm run build
23
+ - name : Set up QEMU
24
+ uses : docker/setup-qemu-action@master
25
+ with :
26
+ platforms : all
27
+ - name : Set up Docker Buildx
28
+ id : buildx
29
+ uses : docker/setup-buildx-action@master
30
+ - name : Get Docker meta
31
+ id : meta
32
+ uses : docker/metadata-action@v5
33
+ with :
34
+ images : josephdadams/tallyarbiter
35
+ tags : |
36
+ type=raw,value=latest,enable=true
37
+ type=ref,event=tag
38
+ flavor : |
39
+ latest=false
40
+ - name : Login to DockerHub
41
+ uses : docker/login-action@v3
42
+ with :
43
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
44
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
45
+ - name : Create env file
46
+ run : |
47
+ touch .env
48
+ echo SENTRY_ENABLED=1 >> .env
49
+ echo SENTRY_DSN=${{ secrets.SENTRY_DSN }} >> .env
50
+ - name : Build and push (multiarch)
51
+ uses : docker/build-push-action@v5
52
+ with :
53
+ builder : ${{ steps.buildx.outputs.name }}
54
+ context : .
55
+ push : ${{ github.event.inputs.git-ref }}
56
+ tags : ${{ steps.meta.outputs.tags }}
57
+ labels : ${{ steps.meta.outputs.labels }}
58
+ platforms : linux/amd64,linux/arm64,linux/s390x,linux/arm/v7,linux/arm/v6
0 commit comments