From ce9047ffe6e54bdb3ca7d0b89f82a80544e71115 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 | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 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..4bbc1cfb7f --- /dev/null +++ b/.github/workflows/images.yaml @@ -0,0 +1,32 @@ +name: Publish + +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 Image from Kubernetes Registry + run: docker pull --platform linux/amd64,linux/arm64 registry.k8s.io/pause:3.7 + + - name: Tag the image + run: docker tag registry.k8s.io/pause:3.7 ghcr.io/canonical/pause:3.7 + + - name: Push the image to GitHub Container Registry + run: docker push ghcr.io/canonical/pause:3.7 \ No newline at end of file