Skip to content

Commit

Permalink
Pull pause image from k8s.io, tag and push to ghcr.io/canonical
Browse files Browse the repository at this point in the history
  • Loading branch information
eaudetcobello committed May 1, 2024
1 parent af5c839 commit 200df54
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/images.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
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 registry.k8s.io/pause:3.7
docker tag registry.k8s.io/pause:3.7 ghcr.io/canonical/pause:3.7
docker pull --platform linux/arm64 registry.k8s.io/pause:3.7
docker tag registry.k8s.io/pause:3.7 ghcr.io/canonical/pause:3.7-arm64
docker pull --platform linux/amd64 registry.k8s.io/pause:3.7
docker tag registry.k8s.io/pause:3.7 ghcr.io/canonical/pause:3.7-amd64
- name: Create and push Docker manifest
run: |
docker manifest create ghcr.io/canonical/pause:3.7 \
ghcr.io/canonical/pause-amd64:3.7 \
ghcr.io/canonical/pause-arm64:3.7
docker manifest annotate ghcr.io/canonical/pause:3.7 ghcr.io/canonical/pause-amd64 --os linux --arch amd64
docker manifest annotate ghcr.io/canonical/pause:3.7 ghcr.io/canonical/pause-arm64 --os linux --arch arm64
docker manifest push ghcr.io/canonical/pause:3.7

0 comments on commit 200df54

Please sign in to comment.