1
+ name : Docker Build
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ push :
6
+ branches :
7
+ - main
8
+ tags :
9
+ - ' v*'
10
+ pull_request :
11
+ branches :
12
+ - main
13
+
14
+ jobs :
15
+ build :
16
+ name : Build Docker Images
17
+ runs-on :
18
+ - runs-on
19
+ - cpu=16
20
+ - ram=64
21
+ - family=m7a+m7i-flex
22
+ - image=ubuntu22-full-x64
23
+ - run-id=${{ github.run_id }}
24
+
25
+ steps :
26
+ - name : Checkout code
27
+ uses : actions/checkout@v4
28
+
29
+ - name : Set up Docker Buildx
30
+ uses : docker/setup-buildx-action@v3
31
+
32
+ - name : Docker meta for op-proposer
33
+ id : meta-op-proposer
34
+ uses : docker/metadata-action@v5
35
+ with :
36
+ images : ghcr.io/${{ github.repository }}/op-proposer
37
+ tags : |
38
+ type=ref,event=branch
39
+ type=ref,event=pr
40
+ type=semver,pattern={{version}}
41
+ type=semver,pattern={{major}}.{{minor}}
42
+ type=sha
43
+
44
+ - name : Docker meta for succinct-proposer
45
+ id : meta-succinct
46
+ uses : docker/metadata-action@v5
47
+ with :
48
+ images : ghcr.io/${{ github.repository }}/succinct-proposer
49
+ tags : |
50
+ type=ref,event=branch
51
+ type=ref,event=pr
52
+ type=semver,pattern={{version}}
53
+ type=semver,pattern={{major}}.{{minor}}
54
+ type=sha
55
+
56
+ - name : Login to GitHub Container Registry
57
+ if : github.event_name != 'pull_request'
58
+ uses : docker/login-action@v3
59
+ with :
60
+ registry : ghcr.io
61
+ username : ${{ github.actor }}
62
+ password : ${{ secrets.GITHUB_TOKEN }}
63
+
64
+ - name : Pre-build debug
65
+ run : |
66
+ echo "Meta tags: ${{ steps.meta-op-proposer.outputs.tags }}"
67
+ echo "Push condition: ${{ github.event_name != 'pull_request' }}"
68
+ echo "Event name: ${{ github.event_name }}"
69
+
70
+ - name : Build and push op-proposer
71
+ uses : docker/build-push-action@v6
72
+ with :
73
+ context : .
74
+ file : proposer/op/Dockerfile.op_proposer
75
+ push : ${{ github.event_name != 'pull_request' }}
76
+ tags : ${{ steps.meta-op-proposer.outputs.tags }}
77
+ labels : ${{ steps.meta-op-proposer.outputs.labels }}
78
+ cache-from : type=gha
79
+ cache-to : type=gha,mode=max
80
+
81
+ - name : Post-build debug
82
+ run : |
83
+ docker images
84
+ echo "Checking authentication:"
85
+ docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} 2>&1 || true
86
+
87
+ - name : Build and push succinct-proposer
88
+ uses : docker/build-push-action@v6
89
+ with :
90
+ context : .
91
+ file : proposer/succinct/Dockerfile
92
+ push : ${{ github.event_name != 'pull_request' }}
93
+ tags : ${{ steps.meta-succinct.outputs.tags }}
94
+ labels : ${{ steps.meta-succinct.outputs.labels }}
95
+ cache-from : type=gha
96
+ cache-to : type=gha,mode=max
0 commit comments