Pull pause image from k8s.io, tag and push to ghcr.io/canonical #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- "eaudetcobello/KU-617" | |
schedule: | |
- cron: '0 0 * * *' # Runs every midnight | |
jobs: | |
publish: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Pull and tag images for each architecture | |
run: | | |
docker pull --platform linux/amd64 registry.k8s.io/pause:latest | |
docker tag registry.k8s.io/pause:latest ghcr.io/canonical/pause-amd64:latest | |
docker pull --platform linux/ppc64le registry.k8s.io/pause:latest | |
docker tag registry.k8s.io/pause:latest ghcr.io/canonical/pause-ppc64le:latest | |
docker pull --platform linux/s390x registry.k8s.io/pause:latest | |
docker tag registry.k8s.io/pause:latest ghcr.io/canonical/pause-s390x:latest | |
docker pull --platform windows/amd64 registry.k8s.io/pause:latest | |
docker tag registry.k8s.io/pause:latest ghcr.io/canonical/pause-win10:latest | |
- name: Create and push Docker manifest | |
run: | | |
docker manifest create ghcr.io/canonical/pause:latest ghcr.io/canonical/pause-amd64:latest ghcr.io/canonical/pause-armv7:latest ghcr.io/canonical/pause-arm64:latest ghcr.io/canonical/pause-ppc64le:latest ghcr.io/canonical/pause-s390x:latest ghcr.io/canonical/pause-win10-17763:latest ghcr.io/canonical/pause-win10-19042:latest ghcr.io/canonical/pause-win10-20348:latest | |
docker manifest annotate --arch amd64 ghcr.io/canonical/pause:latest ghcr.io/canonical/pause-amd64:latest | |
docker manifest annotate --arch ppc64le ghcr.io/canonical/pause:latest ghcr.io/canonical/pause-ppc64le:latest | |
docker manifest annotate --arch s390x ghcr.io/canonical/pause:latest ghcr.io/canonical/pause-s390x:latest | |
docker manifest annotate --arch amd64 --os windows ghcr.io/canonical/pause:latest ghcr.io/canonical/pause-win10:latest | |
docker push ghcr.io/canonical/pause:latest |