Publish Mirrored Images Daily #215
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
name: Publish Mirrored Images Daily | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '0 2 * * *' | |
permissions: | |
contents: read | |
id-token: write # this is important, it's how we authenticate with Vault | |
env: | |
IMAGES_FILE: images-list-daily | |
jobs: | |
mirror-images: | |
runs-on: ubuntu-latest | |
if: github.repository == 'rancher/image-mirror' | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Validate that the list is sorted correctly | |
run: grep -vE '^\s*(#|//)' ${IMAGES_FILE} | sort -Vc | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: "Read some Secrets" | |
uses: rancher-eio/read-vault-secrets@main | |
with: | |
secrets: | | |
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials username | DOCKER_USERNAME ; | |
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials password | DOCKER_PASSWORD | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ env.DOCKER_USERNAME }} | |
password: ${{ env.DOCKER_PASSWORD }} | |
- name: Run image-mirror.sh | |
run: ./scripts/image-mirror.sh |