Skip to content

Commit 986a5fd

Browse files
committed
v1.87.0 (ci)
1 parent 7fd5467 commit 986a5fd

File tree

1 file changed

+150
-51
lines changed

1 file changed

+150
-51
lines changed

.github/workflows/release.yaml

Lines changed: 150 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
name: release
1+
name: release-1.x
22
on:
33
push:
44
tags:
5-
- 'v1.0.[0-9]+'
5+
- 'v1.[0-9]+.[0-9]+'
6+
7+
env:
8+
DOCKER_IMAGE: ghcr.io/joseluisq/rust-linux-darwin-builder
69

710
jobs:
8-
build-amd64:
9-
name: build (amd64)
11+
docker-amd64:
12+
name: Docker release (amd64)
1013
runs-on: ubuntu-22.04
1114
steps:
1215
-
@@ -24,100 +27,196 @@ jobs:
2427
sudo rm -rf /usr/local/lib/android/sdk/extras
2528
sudo rm -rf /usr/local/lib/android/sdk/ndk
2629
-
27-
name: Set up QEMU
30+
name: Login to ghcr.io
31+
uses: docker/login-action@v3
32+
with:
33+
registry: ghcr.io
34+
username: ${{ github.actor }}
35+
password: ${{ secrets.GITHUB_TOKEN }}
36+
-
37+
name: Login to DockerHub
38+
uses: docker/login-action@v3
39+
with:
40+
username: ${{ secrets.DOCKERHUB_USERNAME }}
41+
password: ${{ secrets.DOCKERHUB_TOKEN }}
42+
-
43+
name: QEMU
2844
uses: docker/setup-qemu-action@v3
2945
-
30-
name: Docker meta
31-
id: meta-amd64
46+
name: Metadata (base)
47+
id: meta
3248
uses: docker/metadata-action@v5
3349
with:
34-
images: joseluisq/rust-linux-darwin-builder
50+
images: |
51+
joseluisq/rust-linux-darwin-builder
52+
ghcr.io/joseluisq/rust-linux-darwin-builder
3553
flavor: |
36-
latest=true
54+
latest=false
3755
suffix=-amd64
3856
tags: |
3957
type=semver,pattern={{version}}
58+
type=semver,pattern={{version}}-amd64
4059
-
41-
name: Set up Docker Buildx
60+
name: Setup (base)
4261
uses: docker/setup-buildx-action@v3
4362
-
44-
name: Login to ghcr.io
45-
uses: docker/login-action@v3
63+
name: Build (base)
64+
uses: docker/build-push-action@v6
4665
with:
47-
registry: ghcr.io
48-
username: ${{ github.actor }}
49-
password: ${{ secrets.GITHUB_TOKEN }}
66+
context: .
67+
platforms: linux/amd64
68+
file: Dockerfile
69+
tags: ${{ steps.meta.outputs.tags }}
70+
labels: ${{ steps.meta.outputs.labels }}
71+
build-args: |
72+
VERSION=${{ steps.meta.outputs.version }}
73+
push: false
74+
load: true
75+
cache-from: type=gha,scope=devel-1x-amd64
76+
cache-to: type=gha,scope=devel-1x-amd64,mode=max
5077
-
51-
name: Login to DockerHub
52-
uses: docker/login-action@v3
78+
name: Inspect (base)
79+
run: |
80+
docker image inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}
81+
-
82+
name: Tests (base)
83+
uses: addnab/docker-run-action@v3
5384
with:
54-
username: ${{ secrets.DOCKERHUB_USERNAME }}
55-
password: ${{ secrets.DOCKERHUB_TOKEN }}
85+
image: "${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}"
86+
shell: bash
87+
options: -v ${{ github.workspace }}:/root/src
88+
run: |
89+
set -eux
90+
cat /etc/debian_version
91+
uname -a
92+
make test-ci
5693
-
57-
name: Build and push
94+
name: Push (base)
5895
uses: docker/build-push-action@v6
5996
with:
60-
push: true
61-
provenance: false
6297
context: .
6398
platforms: linux/amd64
6499
file: Dockerfile
65-
tags: ${{ steps.meta-amd64.outputs.tags }}
100+
tags: ${{ steps.meta.outputs.tags }}
101+
labels: ${{ steps.meta.outputs.labels }}
102+
build-args: |
103+
VERSION=${{ steps.meta.outputs.version }}
104+
push: true
105+
provenance: false
106+
cache-from: type=gha,scope=devel-1x-amd64
107+
cache-to: type=gha,scope=devel-1x-amd64,mode=max
108+
-
109+
name: Manifest (base)
110+
run: |
111+
docker buildx imagetools inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}
66112
67-
build-arm64:
68-
name: build (arm64)
113+
docker-arm64:
114+
name: Docker release (arm64)
69115
runs-on: ubuntu-22.04-arm
70116
steps:
71117
-
72118
name: Checkout
73119
uses: actions/checkout@v4
120+
with:
121+
fetch-depth: 1
122+
# https://github.com/actions/runner-images/issues/2840
123+
- name: Free disk space
124+
run: |
125+
sudo rm -rf /usr/share/dotnet
126+
sudo rm -rf /usr/local/lib/android/sdk/build-tools
127+
sudo rm -rf /usr/local/lib/android/sdk/cmake
128+
sudo rm -rf /usr/local/lib/android/sdk/cmdline-tools
129+
sudo rm -rf /usr/local/lib/android/sdk/extras
130+
sudo rm -rf /usr/local/lib/android/sdk/ndk
131+
-
132+
name: Login to ghcr.io
133+
uses: docker/login-action@v3
134+
with:
135+
registry: ghcr.io
136+
username: ${{ github.actor }}
137+
password: ${{ secrets.GITHUB_TOKEN }}
74138
-
75-
name: Set up QEMU
139+
name: Login to DockerHub
140+
uses: docker/login-action@v3
141+
with:
142+
username: ${{ secrets.DOCKERHUB_USERNAME }}
143+
password: ${{ secrets.DOCKERHUB_TOKEN }}
144+
-
145+
name: QEMU
76146
uses: docker/setup-qemu-action@v3
77147
-
78-
name: Docker meta
79-
id: meta-arm64
148+
name: Metadata (base)
149+
id: meta
80150
uses: docker/metadata-action@v5
81151
with:
82152
images: |
83153
joseluisq/rust-linux-darwin-builder
84154
ghcr.io/joseluisq/rust-linux-darwin-builder
85155
flavor: |
86-
latest=true
156+
latest=false
87157
suffix=-arm64
88158
tags: |
89159
type=semver,pattern={{version}}
160+
type=semver,pattern={{version}}-arm64
90161
-
91-
name: Set up Docker Buildx
162+
name: Setup (base)
92163
uses: docker/setup-buildx-action@v3
93164
-
94-
name: Login to ghcr.io
95-
uses: docker/login-action@v3
165+
name: Build (base)
166+
uses: docker/build-push-action@v6
96167
with:
97-
registry: ghcr.io
98-
username: ${{ github.actor }}
99-
password: ${{ secrets.GITHUB_TOKEN }}
168+
context: .
169+
platforms: linux/arm64
170+
file: Dockerfile
171+
tags: ${{ steps.meta.outputs.tags }}
172+
labels: ${{ steps.meta.outputs.labels }}
173+
build-args: |
174+
VERSION=${{ steps.meta.outputs.version }}
175+
push: false
176+
load: true
177+
cache-from: type=gha,scope=devel-1x-arm64
178+
cache-to: type=gha,scope=devel-1x-arm64,mode=max
100179
-
101-
name: Login to DockerHub
102-
uses: docker/login-action@v3
180+
name: Inspect (base)
181+
run: |
182+
docker image inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}
183+
-
184+
name: Tests (base)
185+
uses: addnab/docker-run-action@v3
103186
with:
104-
username: ${{ secrets.DOCKERHUB_USERNAME }}
105-
password: ${{ secrets.DOCKERHUB_TOKEN }}
187+
image: "${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}"
188+
shell: bash
189+
options: -v ${{ github.workspace }}:/root/src
190+
run: |
191+
set -eux
192+
cat /etc/debian_version
193+
uname -a
194+
make test-ci
106195
-
107-
name: Build and push
196+
name: Push (base)
108197
uses: docker/build-push-action@v6
109198
with:
110-
push: true
111-
provenance: false
112199
context: .
113200
platforms: linux/arm64
114201
file: Dockerfile
115-
tags: ${{ steps.meta-arm64.outputs.tags }}
202+
tags: ${{ steps.meta.outputs.tags }}
203+
labels: ${{ steps.meta.outputs.labels }}
204+
build-args: |
205+
VERSION=${{ steps.meta.outputs.version }}
206+
push: true
207+
provenance: false
208+
cache-from: type=gha,scope=devel-1x-arm64
209+
cache-to: type=gha,scope=devel-1x-arm64,mode=max
210+
-
211+
name: Manifest (base)
212+
run: |
213+
docker buildx imagetools inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}
116214
117215
manifest:
216+
name: Docker release (manifest)
118217
needs:
119-
- build-amd64
120-
- build-arm64
218+
- docker-amd64
219+
- docker-arm64
121220
runs-on: ubuntu-22.04
122221
steps:
123222
# https://github.com/actions/runner-images/issues/2840
@@ -172,12 +271,12 @@ jobs:
172271
docker manifest push joseluisq/rust-linux-darwin-builder:$SEMVER_MINOR
173272
174273
docker manifest create \
175-
ghcr.io/joseluisq/rust-lisq/rust-linux-darwin-builder:$SEMVER-arm64
274+
ghcr.io/joseluisq/rust-linux-darwin-builder:$SEMVER_MINOR \
275+
--amend ghcr.io/joseluisq/rust-linux-darwin-builder:$SEMVER-amd64 \
276+
--amend ghcr.io/joseluisq/rust-linux-darwin-builder:$SEMVER-arm64
176277
docker manifest push ghcr.io/joseluisq/rust-linux-darwin-builder:$SEMVER_MINOR
177278
-
178-
name: Push latest (1.0 or newer)nux-darwin-builder:$SEMVER_MINOR \
179-
--amend ghcr.io/joseluisq/rust-linux-darwin-builder:$SEMVER-amd64 \
180-
--amend ghcr.io/joselui
279+
name: Push latest (1.0)
181280
run: |
182281
docker manifest create \
183282
joseluisq/rust-linux-darwin-builder:latest \
@@ -186,7 +285,7 @@ jobs:
186285
docker manifest push joseluisq/rust-linux-darwin-builder:latest
187286
188287
docker manifest create \
189-
ghcr.io/joseluisghcr.io/q/rust-linux-darwin-builder:latest \
288+
ghcr.io/joseluisq/rust-linux-darwin-builder:latest \
190289
--amend ghcr.io/joseluisq/rust-linux-darwin-builder:$SEMVER-amd64 \
191290
--amend ghcr.io/joseluisq/rust-linux-darwin-builder:$SEMVER-arm64
192291
docker manifest push ghcr.io/joseluisq/rust-linux-darwin-builder:latest
@@ -205,7 +304,7 @@ jobs:
205304
--amend ghcr.io/joseluisq/rust-linux-darwin-builder:$SEMVER-arm64
206305
docker manifest push ghcr.io/joseluisq/rust-linux-darwin-builder:$SEMVER
207306
-
208-
name: Push semver major alias (1.0 or newer)
307+
name: Push semver major alias (1.0)
209308
run: |
210309
docker manifest create \
211310
joseluisq/rust-linux-darwin-builder:$SEMVER_MAJOR \

0 commit comments

Comments
 (0)