Skip to content

Commit 62656ab

Browse files
committed
v1.0.0-beta.1
1 parent 4296f68 commit 62656ab

6 files changed

Lines changed: 298 additions & 33 deletions

File tree

.github/workflows/devel.yml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
name: devel-docker
1+
name: devel
22
on:
33
pull_request:
44
branches:
55
- master
66
paths:
7-
- Dockerfile
8-
- .github/workflows/devel.yml
7+
- docker/**
8+
- .github/workflows/*.yml
99
push:
1010
branches:
1111
- master
1212
paths:
13-
- Dockerfile
14-
- .github/workflows/devel.yml
13+
- docker/**
14+
- .github/workflows/*.yml
1515

1616
env:
1717
DOCKER_IMAGE: localhost:5000/github.com/joseluisq/docker-osxcross
@@ -103,9 +103,12 @@ jobs:
103103
name: Run tests
104104
uses: addnab/docker-run-action@v3
105105
with:
106-
image: ${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}
106+
image: "${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}"
107+
shell: bash
107108
run: |
109+
set -eux
108110
cat /etc/debian_version
111+
uname -a
109112
osxcross
110113
echo "OSX_SDK_VERSION=$OSX_SDK_VERSION"
111114
echo "OSX_SDK_SUM=$OSX_SDK_SUM"
@@ -203,6 +206,26 @@ jobs:
203206
if: github.event_name != 'pull_request'
204207
run: |
205208
docker buildx imagetools inspect ${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}
209+
-
210+
name: Run tests
211+
uses: addnab/docker-run-action@v3
212+
with:
213+
image: "${{ env.DOCKER_IMAGE }}:${{ steps.meta.outputs.version }}"
214+
shell: bash
215+
run: |
216+
set -eux
217+
cat /etc/debian_version
218+
uname -a
219+
osxcross
220+
echo "OSX_SDK_VERSION=$OSX_SDK_VERSION"
221+
echo "OSX_SDK_SUM=$OSX_SDK_SUM"
222+
echo "OSX_VERSION_MIN=$OSX_VERSION_MIN"
223+
echo "OSX_CROSS_COMMIT=$OSX_CROSS_COMMIT"
224+
echo "PATH=$PATH"
225+
echo "MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET"
226+
echo "OSXCROSS_MACPORTS_MIRROR=$OSXCROSS_MACPORTS_MIRROR"
227+
echo "OSXCROSS_MACPORTS_LOCAL=$OSXCROSS_MACPORTS_LOCAL"
228+
echo "OSXCROSS_MACPORTS_LIBEXEC=$OSXCROSS_MACPORTS_LIBEXEC"
206229
-
207230
# Temp fix
208231
# https://github.com/docker/build-push-action/issues/252

.github/workflows/release-beta.yml

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
name: release-beta
2+
on:
3+
push:
4+
tags:
5+
- 'v1.0.[0-9]+-beta.[0-9]+'
6+
7+
jobs:
8+
build-amd64:
9+
name: osxcross (amd64)
10+
runs-on: ubuntu-22.04
11+
steps:
12+
-
13+
name: Checkout
14+
uses: actions/checkout@v4
15+
-
16+
name: Set up QEMU
17+
uses: docker/setup-qemu-action@v3
18+
-
19+
name: Docker meta
20+
id: meta
21+
uses: docker/metadata-action@v5
22+
with:
23+
images: |
24+
joseluisq/docker-osxcross
25+
ghcr.io/joseluisq/docker-osxcross
26+
flavor: |
27+
latest=false
28+
suffix=-amd64
29+
tags: |
30+
type=semver,pattern={{version}}
31+
type=semver,pattern={{version}}-amd64
32+
-
33+
name: Set up Docker Buildx
34+
uses: docker/setup-buildx-action@v3
35+
-
36+
name: Login to ghcr.io
37+
uses: docker/login-action@v3
38+
with:
39+
registry: ghcr.io
40+
username: ${{ github.actor }}
41+
password: ${{ secrets.GITHUB_TOKEN }}
42+
-
43+
name: Login to DockerHub
44+
uses: docker/login-action@v3
45+
with:
46+
username: ${{ secrets.DOCKERHUB_USERNAME }}
47+
password: ${{ secrets.DOCKERHUB_TOKEN }}
48+
-
49+
name: Build and push
50+
uses: docker/build-push-action@v6
51+
with:
52+
push: true
53+
provenance: false
54+
context: .
55+
platforms: linux/amd64
56+
file: ./docker/amd64/Dockerfile
57+
tags: ${{ steps.meta.outputs.tags }}
58+
59+
build-arm64:
60+
name: osxcross (arm64)
61+
runs-on: ubuntu-22.04-arm
62+
steps:
63+
-
64+
name: Checkout
65+
uses: actions/checkout@v4
66+
-
67+
name: Set up QEMU
68+
uses: docker/setup-qemu-action@v3
69+
-
70+
name: Docker meta
71+
id: meta
72+
uses: docker/metadata-action@v5
73+
with:
74+
images: |
75+
joseluisq/docker-osxcross
76+
ghcr.io/joseluisq/docker-osxcross
77+
flavor: |
78+
latest=false
79+
suffix=-arm64
80+
tags: |
81+
type=semver,pattern={{version}}
82+
type=semver,pattern={{version}}-arm64
83+
-
84+
name: Set up Docker Buildx
85+
uses: docker/setup-buildx-action@v3
86+
-
87+
name: Login to ghcr.io
88+
uses: docker/login-action@v3
89+
with:
90+
registry: ghcr.io
91+
username: ${{ github.actor }}
92+
password: ${{ secrets.GITHUB_TOKEN }}
93+
-
94+
name: Login to DockerHub
95+
uses: docker/login-action@v3
96+
with:
97+
username: ${{ secrets.DOCKERHUB_USERNAME }}
98+
password: ${{ secrets.DOCKERHUB_TOKEN }}
99+
-
100+
name: Build and push
101+
uses: docker/build-push-action@v6
102+
with:
103+
push: true
104+
provenance: false
105+
context: .
106+
platforms: linux/arm64
107+
file: ./docker/arm64/Dockerfile
108+
tags: ${{ steps.meta.outputs.tags }}
109+
110+
manifest:
111+
needs:
112+
- build-amd64
113+
- build-arm64
114+
runs-on: ubuntu-22.04
115+
steps:
116+
- name: Set envs
117+
run: |
118+
github_ref=${GITHUB_REF#refs/tags/}
119+
SEMVER=${github_ref##*v}
120+
echo "SEMVER=${SEMVER}" >> $GITHUB_ENV
121+
echo $SEMVER
122+
-
123+
name: Login to ghcr.io
124+
uses: docker/login-action@v3
125+
with:
126+
registry: ghcr.io
127+
username: ${{ github.actor }}
128+
password: ${{ secrets.GITHUB_TOKEN }}
129+
-
130+
name: Login to DockerHub
131+
uses: docker/login-action@v3
132+
with:
133+
username: ${{ secrets.DOCKERHUB_USERNAME }}
134+
password: ${{ secrets.DOCKERHUB_TOKEN }}
135+
-
136+
name: Pull all images
137+
run: |
138+
docker pull joseluisq/docker-osxcross:$SEMVER-amd64
139+
docker pull joseluisq/docker-osxcross:$SEMVER-arm64
140+
141+
docker pull ghcr.io/joseluisq/docker-osxcross:$SEMVER-amd64
142+
docker pull ghcr.io/joseluisq/docker-osxcross:$SEMVER-arm64
143+
-
144+
name: Push semver alias
145+
run: |
146+
docker manifest create \
147+
joseluisq/docker-osxcross:$SEMVER \
148+
--amend joseluisq/docker-osxcross:$SEMVER-amd64 \
149+
--amend joseluisq/docker-osxcross:$SEMVER-arm64
150+
docker manifest push joseluisq/docker-osxcross:$SEMVER
151+
152+
docker manifest create \
153+
ghcr.io/joseluisq/docker-osxcross:$SEMVER \
154+
--amend ghcr.io/joseluisq/docker-osxcross:$SEMVER-amd64 \
155+
--amend ghcr.io/joseluisq/docker-osxcross:$SEMVER-arm64
156+
docker manifest push ghcr.io/joseluisq/docker-osxcross:$SEMVER

.github/workflows/release.yml

Lines changed: 68 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ on:
33
push:
44
tags:
55
- 'v1.0.[0-9]+'
6-
- 'v1.0.[0-9]+-beta.[0-9]+'
76

87
jobs:
98
build-amd64:
@@ -26,12 +25,17 @@ jobs:
2625
latest=true
2726
suffix=-amd64
2827
tags: |
29-
type=semver,pattern={{version}}-amd64
30-
type=semver,pattern={{major}}.{{minor}}-amd64
31-
type=semver,pattern={{major}}-amd64
28+
type=semver,pattern={{version}}
3229
-
3330
name: Set up Docker Buildx
3431
uses: docker/setup-buildx-action@v3
32+
-
33+
name: Login to ghcr.io
34+
uses: docker/login-action@v3
35+
with:
36+
registry: ghcr.io
37+
username: ${{ github.actor }}
38+
password: ${{ secrets.GITHUB_TOKEN }}
3539
-
3640
name: Login to DockerHub
3741
uses: docker/login-action@v3
@@ -64,17 +68,24 @@ jobs:
6468
id: meta-arm64
6569
uses: docker/metadata-action@v5
6670
with:
67-
images: joseluisq/docker-osxcross
71+
images: |
72+
joseluisq/docker-osxcross
73+
ghcr.io/joseluisq/docker-osxcross
6874
flavor: |
6975
latest=true
7076
suffix=-arm64
7177
tags: |
72-
type=semver,pattern={{version}}-arm64
73-
type=semver,pattern={{major}}.{{minor}}-arm64
74-
type=semver,pattern={{major}}-arm64
78+
type=semver,pattern={{version}}
7579
-
7680
name: Set up Docker Buildx
7781
uses: docker/setup-buildx-action@v3
82+
-
83+
name: Login to ghcr.io
84+
uses: docker/login-action@v3
85+
with:
86+
registry: ghcr.io
87+
username: ${{ github.actor }}
88+
password: ${{ secrets.GITHUB_TOKEN }}
7889
-
7990
name: Login to DockerHub
8091
uses: docker/login-action@v3
@@ -102,55 +113,88 @@ jobs:
102113
run: |
103114
github_ref=${GITHUB_REF#refs/tags/}
104115
SEMVER=${github_ref##*v}
105-
SEMVER=${SEMVER}
106116
SEMVER_MAJOR=${SEMVER%.*.*}
107-
SEMVER_MINOR=${SEMVER%*}
117+
SEMVER_MINOR=${SEMVER%.*}
108118
echo "SEMVER=${SEMVER}" >> $GITHUB_ENV
109119
echo "SEMVER_MAJOR=${SEMVER_MAJOR}" >> $GITHUB_ENV
110120
echo "SEMVER_MINOR=${SEMVER_MINOR}" >> $GITHUB_ENV
111121
echo $SEMVER
112122
echo $SEMVER_MAJOR
113123
echo $SEMVER_MINOR
114124
-
115-
name: Login to DockerHub
125+
name: Login to ghcr.io
116126
uses: docker/login-action@v3
127+
with:
128+
registry: ghcr.io
129+
username: ${{ github.actor }}
130+
password: ${{ secrets.GITHUB_TOKEN }}
131+
-
132+
name: Login to DockerHub
133+
uses: docker/login-action@v3
117134
with:
118135
username: ${{ secrets.DOCKERHUB_USERNAME }}
119136
password: ${{ secrets.DOCKERHUB_TOKEN }}
137+
-
138+
name: Pull all images
139+
run: |
140+
docker pull joseluisq/docker-osxcross:$SEMVER-amd64
141+
docker pull joseluisq/docker-osxcross:$SEMVER-arm64
142+
143+
docker pull ghcr.io/joseluisq/docker-osxcross:$SEMVER-amd64
144+
docker pull ghcr.io/joseluisq/docker-osxcross:$SEMVER-arm64
120145
-
121146
name: Push semver minor alias
122147
run: |
123148
docker manifest create \
124149
joseluisq/docker-osxcross:$SEMVER_MINOR \
125-
--amend joseluisq/docker-osxcross:$SEMVER_MINOR-amd64 \
126-
--amend joseluisq/docker-osxcross:$SEMVER_MINOR-arm64
150+
--amend joseluisq/docker-osxcross:$SEMVER-amd64 \
151+
--amend joseluisq/docker-osxcross:$SEMVER-arm64
127152
docker manifest push joseluisq/docker-osxcross:$SEMVER_MINOR
153+
154+
docker manifest create \
155+
ghcr.io/joseluisq/docker-osxcross:$SEMVER_MINOR \
156+
--amend ghcr.io/joseluisq/docker-osxcross:$SEMVER-amd64 \
157+
--amend ghcr.io/joseluisq/docker-osxcross:$SEMVER-arm64
158+
docker manifest push ghcr.io/joseluisq/docker-osxcross:$SEMVER_MINOR
128159
-
129160
name: Push latest (1.0 or newer)
130161
run: |
131162
docker manifest create \
132163
joseluisq/docker-osxcross:latest \
133-
--amend joseluisq/docker-osxcross:$SEMVER_MINOR-amd64 \
134-
--amend joseluisq/docker-osxcross:$SEMVER_MINOR-arm64
164+
--amend joseluisq/docker-osxcross:$SEMVER-amd64 \
165+
--amend joseluisq/docker-osxcross:$SEMVER-arm64
135166
docker manifest push joseluisq/docker-osxcross:latest
136-
-
137-
name: Pull all images
138-
run: |
139-
docker pull joseluisq/docker-osxcross:$SEMVER_MINOR-amd64
140-
docker pull joseluisq/docker-osxcross:$SEMVER_MINOR-arm64
167+
168+
docker manifest create \
169+
ghcr.io/joseluisghcr.io/q/docker-osxcross:latest \
170+
--amend ghcr.io/joseluisq/docker-osxcross:$SEMVER-amd64 \
171+
--amend ghcr.io/joseluisq/docker-osxcross:$SEMVER-arm64
172+
docker manifest push ghcr.io/joseluisq/docker-osxcross:latest
141173
-
142174
name: Push semver alias
143175
run: |
144176
docker manifest create \
145177
joseluisq/docker-osxcross:$SEMVER \
146-
--amend joseluisq/docker-osxcross:$SEMVER_MINOR-amd64 \
147-
--amend joseluisq/docker-osxcross:$SEMVER_MINOR-arm64
178+
--amend joseluisq/docker-osxcross:$SEMVER-amd64 \
179+
--amend joseluisq/docker-osxcross:$SEMVER-arm64
148180
docker manifest push joseluisq/docker-osxcross:$SEMVER
181+
182+
docker manifest create \
183+
ghcr.io/joseluisq/docker-osxcross:$SEMVER \
184+
--amend ghcr.io/joseluisq/docker-osxcross:$SEMVER-amd64 \
185+
--amend ghcr.io/joseluisq/docker-osxcross:$SEMVER-arm64
186+
docker manifest push ghcr.io/joseluisq/docker-osxcross:$SEMVER
149187
-
150188
name: Push semver major alias (1.0 or newer)
151189
run: |
152190
docker manifest create \
153191
joseluisq/docker-osxcross:$SEMVER_MAJOR \
154-
--amend joseluisq/docker-osxcross:$SEMVER_MINOR-amd64 \
155-
--amend joseluisq/docker-osxcross:$SEMVER_MINOR-arm64
192+
--amend joseluisq/docker-osxcross:$SEMVER-amd64 \
193+
--amend joseluisq/docker-osxcross:$SEMVER-arm64
156194
docker manifest push joseluisq/docker-osxcross:$SEMVER_MAJOR
195+
196+
docker manifest create \
197+
ghcr.io/joseluisq/docker-osxcross:$SEMVER_MAJOR \
198+
--amend ghcr.io/joseluisq/docker-osxcross:$SEMVER-amd64 \
199+
--amend ghcr.io/joseluisq/docker-osxcross:$SEMVER-arm64
200+
docker manifest push ghcr.io/joseluisq/docker-osxcross:$SEMVER_MAJOR

0 commit comments

Comments
 (0)