Skip to content

Commit 061b28c

Browse files
committed
Fixup build state to only use Docker Hub registry
1 parent 964f295 commit 061b28c

File tree

1 file changed

+14
-22
lines changed

1 file changed

+14
-22
lines changed

.github/workflows/publish.yml

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -34,38 +34,30 @@ jobs:
3434
# https://github.com/docker/setup-buildx-action
3535
- name: Set up Docker Buildx
3636
uses: docker/setup-buildx-action@v2
37-
- name: Login to GitHub registry
37+
- name: Login to DockerHub
3838
uses: docker/login-action@v2
3939
with:
40-
registry: ghcr.io
41-
username: ${{ github.repository_owner }}
42-
password: ${{ secrets.GITHUB_TOKEN }}
40+
registry: docker.io
41+
username: ${{ secrets.DOCKER_REPOSITORY_LOGIN }}
42+
password: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
4343
- name: Build and push image
4444
run: make docker-build
4545
env:
46-
# See: https://stackoverflow.com/a/68459169/5155484
47-
# Cache the final image
48-
BUILDKIT_INLINE_CACHE: 1
4946
DOCKER_BUILDKIT: 1
5047
BUILDKIT_MULTI_PLATFORM: "false"
5148
PLATFORM: ${{ matrix.platform }}
52-
IMAGE_TAG: "ghcr.io/sudo-bot/docker-rustpython/rustpython:${{ matrix.internal-tag }}-latest"
49+
IMAGE_TAG: "docker.io/botsudo/docker-rustpython:${{ matrix.internal-tag }}-latest"
5350
ACTION: push
5451
# Disable provenance to remove the attestation from the pushed image
5552
# See: https://github.com/docker/buildx/issues/1509
56-
# It makes: ghcr.io/sudo-bot/docker-rustpython/rustpython:armv6-latest is a manifest list
57-
EXTRA_ARGS: "--provenance=false --cache-to=type=registry,ref=ghcr.io/sudo-bot/docker-rustpython/rustpython-buildcache:${{ matrix.internal-tag }},mode=max --cache-from=type=registry,ref=ghcr.io/sudo-bot/docker-rustpython/rustpython-buildcache:${{ matrix.internal-tag }}"
53+
# It makes: docker.io/botsudo/docker-rustpython:<arch>-latest a manifest list
54+
# And docker manifest create does not like that
55+
EXTRA_ARGS: "--provenance=false"
5856

5957
create-final-image:
6058
runs-on: ubuntu-latest
6159
needs: build-image
6260
steps:
63-
- name: Login to GitHub registry
64-
uses: docker/login-action@v2
65-
with:
66-
registry: ghcr.io
67-
username: ${{ github.repository_owner }}
68-
password: ${{ secrets.GITHUB_TOKEN }}
6961
- name: Login to DockerHub
7062
uses: docker/login-action@v2
7163
with:
@@ -75,12 +67,12 @@ jobs:
7567
- name: Create the manifest
7668
run: |
7769
docker manifest create docker.io/botsudo/docker-rustpython:latest \
78-
ghcr.io/sudo-bot/docker-rustpython/rustpython:armv6-latest \
79-
ghcr.io/sudo-bot/docker-rustpython/rustpython:armv7-latest \
80-
ghcr.io/sudo-bot/docker-rustpython/rustpython:arm64v8-latest \
81-
ghcr.io/sudo-bot/docker-rustpython/rustpython:386-latest \
82-
ghcr.io/sudo-bot/docker-rustpython/rustpython:ppc64le-latest \
83-
ghcr.io/sudo-bot/docker-rustpython/rustpython:amd64-latest
70+
docker.io/botsudo/docker-rustpython:armv6-latest \
71+
docker.io/botsudo/docker-rustpython:armv7-latest \
72+
docker.io/botsudo/docker-rustpython:arm64v8-latest \
73+
docker.io/botsudo/docker-rustpython:386-latest \
74+
docker.io/botsudo/docker-rustpython:ppc64le-latest \
75+
docker.io/botsudo/docker-rustpython:amd64-latest
8476
- name: Push the manifest
8577
run: docker manifest push docker.io/botsudo/docker-rustpython:latest
8678
- name: Inspect the manifest

0 commit comments

Comments
 (0)