From a0470db61770ea1a53a02cd3afdd0f28f82d185a Mon Sep 17 00:00:00 2001 From: eaudetcobello Date: Wed, 1 May 2024 09:45:15 -0400 Subject: [PATCH] Pull pause image from k8s.io, tag and push to ghcr.io/canonical --- .github/workflows/images.yaml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/images.yaml diff --git a/.github/workflows/images.yaml b/.github/workflows/images.yaml new file mode 100644 index 0000000000..eb82c7a42a --- /dev/null +++ b/.github/workflows/images.yaml @@ -0,0 +1,34 @@ +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 --arch amd64 + docker tag registry.k8s.io/pause:3.7 ghcr.io/registry/pause:3.7-amd64 + + - name: Create and push Docker manifest + run: | + docker manifest create ghcr.io/registry/pause:3.7 \ + ghcr.io/registry/pause:3.7-amd64 + docker manifest annotate ghcr.io/registry/pause:3.7 ghcr.io/registry/pause:3.7-amd64 --os linux --arch amd64 + + docker push ghcr.io/registry/pause:3.7-amd64 + docker push ghcr.io/registry/pause:3.7 \ No newline at end of file