File tree Expand file tree Collapse file tree 3 files changed +56
-0
lines changed Expand file tree Collapse file tree 3 files changed +56
-0
lines changed Original file line number Diff line number Diff line change 7
7
permissions :
8
8
contents : write
9
9
id-token : write
10
+ packages : write
10
11
11
12
jobs :
12
13
releaser :
13
14
name : Release
14
15
runs-on : ubuntu-latest
16
+ env :
17
+ # We need to set DOCKER_CLI_EXPERIMENTAL=enable
8000
d for the docker manifest commands to work
18
+ DOCKER_CLI_EXPERIMENTAL : " enabled"
15
19
steps :
16
20
-
17
21
name : Checkout
18
22
uses : actions/checkout@v2
19
23
with :
20
24
fetch-depth : 0
25
+
26
+ # We need QEMU to use buildx and be able to build ARM Docker images
27
+ - name : Set up QEMU
28
+ uses : docker/setup-qemu-action@v2
29
+
30
+ - name : Login into Github Docker Registry
31
+ run : echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
32
+ if : startsWith(github.ref, 'refs/tags/v')
33
+
21
34
-
22
35
name : Set up Go
23
36
uses : actions/setup-go@v2
Original file line number Diff line number Diff line change @@ -113,3 +113,35 @@ nfpms:
113
113
- rpm
114
114
recommends :
115
115
- git
116
+
117
+ dockers :
118
+ - image_templates : [ "ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}-amd64" ]
119
+ goarch : amd64
120
+ use : buildx
121
+ build_flag_templates :
122
+ - " --pull"
123
+ - " --platform=linux/amd64"
124
+ - " --label=org.opencontainers.image.source=https://github.com/symfony-cli/symfony-cli"
125
+ - " --label=org.opencontainers.image.created={{.Date}}"
126
+ - " --label=org.opencontainers.image.version={{.Version}}"
127
+ - image_templates : [ "ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}-arm64" ]
128
+ goarch : arm64
129
+ use : buildx
130
+ build_flag_templates :
131
+ - " --pull"
132
+ - " --platform=linux/arm64"
133
+ - " --label=org.opencontainers.image.source=https://github.com/symfony-cli/symfony-cli"
134
+ - " --label=org.opencontainers.image.created={{.Date}}"
135
+ - " --label=org.opencontainers.image.version={{.Version}}"
136
+
137
+ docker_manifests :
138
+ - name_template : ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}
139
+ image_templates : &docker_images
140
+ - ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}-amd64
141
+ - ghcr.io/symfony-cli/{{ .ProjectName }}:{{ .Version }}-arm64
142
+ - name_template : ghcr.io/symfony-cli/{{ .ProjectName }}:v{{ .Major }}
143
+ image_templates : *docker_images
144
+ - name_template : ghcr.io/symfony-cli/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}
145
+ image_templates : *docker_images
146
+ - name_template : ghcr.io/symfony-cli/{{ .ProjectName }}:latest
147
+ image_templates : *docker_images
Original file line number Diff line number Diff line change
1
+ FROM scratch as build
2
+
3
+ COPY --from=composer:latest /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
4
+
5
+ COPY symfony /usr/local/bin/
6
+
7
+ FROM scratch
8
+
9
+ ENTRYPOINT ["/usr/local/bin/symfony" ]
10
+
11
+ COPY --from=build . .
You can’t perform that action at this time.
0 commit comments