Skip to content

Commit 94fa671

Browse files
committed
Make a manifest and push it
1 parent 1e0b794 commit 94fa671

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.github/workflows/publish.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,33 @@ jobs:
3838
PLATFORM: ${{ matrix.platform }}
3939
IMAGE_TAG: "ghcr.io/sudo-bot/docker-rustpython/rustpython-${{ matrix.platform }}:latest"
4040
ACTION: push
41+
EXTRA_ARGS: "--cache-from ghcr.io/sudo-bot/docker-rustpython/rustpython-${{ matrix.platform }}:latest"
42+
43+
create-final-image:
44+
runs-on: ubuntu-latest
45+
steps:
46+
- name: Login to GitHub registry
47+
uses: docker/login-action@v2
48+
with:
49+
registry: ghcr.io
50+
username: ${{ github.repository_owner }}
51+
password: ${{ secrets.GITHUB_TOKEN }}
52+
- name: Login to DockerHub
53+
uses: docker/login-action@v2
54+
with:
55+
registry: docker.io
56+
username: ${{ secrets.DOCKER_REPOSITORY_LOGIN }}
57+
password: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
58+
- name: Create the manifest
59+
run: |
60+
docker manifest create docker.io/botsudo/docker-rustpython:latest \
61+
ghcr.io/sudo-bot/docker-rustpython/rustpython-linux/arm/v6:latest \
62+
ghcr.io/sudo-bot/docker-rustpython/rustpython-linux/arm/v7:latest \
63+
ghcr.io/sudo-bot/docker-rustpython/rustpython-linux/arm/v8:latest \
64+
ghcr.io/sudo-bot/docker-rustpython/rustpython-linux/386:latest \
65+
ghcr.io/sudo-bot/docker-rustpython/rustpython-linux/ppc64le:latest \
66+
ghcr.io/sudo-bot/docker-rustpython/rustpython-linux/amd64:latest
67+
- name: Push the manifest
68+
run: docker manifest push docker.io/botsudo/docker-rustpython:latest
69+
- name: Inspect the manifest
70+
run: docker manifest inspect docker.io/botsudo/docker-rustpython:latest

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ PLATFORM ?= linux/amd64
77

88
ACTION ?= load
99
PROGRESS_MODE ?= plain
10+
EXTRA_ARGS ?=
1011

1112
.PHONY: docker-build
1213

@@ -19,4 +20,5 @@ docker-build:
1920
--build-arg VCS_REF=`git rev-parse HEAD` \
2021
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
2122
--$(ACTION) \
23+
$(EXTRA_ARGS) \
2224
./docker

0 commit comments

Comments
 (0)