diff --git a/.github/workflows/images.yaml b/.github/workflows/images.yaml new file mode 100644 index 0000000000..8e9011e57e --- /dev/null +++ b/.github/workflows/images.yaml @@ -0,0 +1,39 @@ +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 --arch arm64 registry.k8s.io/pause:3.7 + docker tag registry.k8s.io/pause:3.7 ghcr.io/registry/pause:3.7-arm64 + docker pull --arch amd64 registry.k8s.io/pause:3.7 + 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 \ + ghcr.io/registry/pause:3.7-arm64 + docker manifest annotate ghcr.io/registry/pause:3.7 ghcr.io/registry/pause:3.7-amd64 --os linux --arch amd64 + docker manifest annotate ghcr.io/registry/pause:3.7 ghcr.io/registry/pause:3.7-arm64 --os linux --arch arm64 + + docker push ghcr.io/registry/pause:3.7-amd64 + docker push ghcr.io/registry/pause:3.7-arm64 + docker push ghcr.io/registry/pause:3.7 \ No newline at end of file