Update Tigera Operator manifest to latest release and sync docker images #352
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: Update Tigera Operator manifest to latest release and sync docker images | |
on: | |
schedule: | |
# run on Monday at 7 | |
- cron: '0 7 * * 1' | |
workflow_dispatch: | |
inputs: | |
ghcr_org: | |
type: string | |
required: false | |
default: flatcar | |
description: | | |
The name of the GitHub org where the docker images should be pushed. | |
jobs: | |
sync-calico-version: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Check out scripts | |
uses: actions/checkout@v4 | |
- name: Update links to Tigera Operator manifest | |
id: update-links | |
run: .github/workflows/sync-calico-version.sh | |
- name: Create pull request | |
uses: peter-evans/create-pull-request@v6 | |
if: steps.update-links.outputs.UPDATE_NEEDED == 1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: calico-update-${{ steps.update-links.outputs.CALICO_VERSION }} | |
title: Update calico to ${{ steps.update-links.outputs.CALICO_VERSION }} | |
commit-message: Update calico to ${{ steps.update-links.outputs.CALICO_VERSION }} | |
delete-branch: true | |
- name: Login to GitHub Container Registry (ghcr) | |
if: steps.update-links.outputs.UPDATE_NEEDED == 1 | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Mirror calico images to GHCR | |
if: steps.update-links.outputs.UPDATE_NEEDED == 1 | |
env: | |
CALICO_VERSION: ${{ steps.update-links.outputs.CALICO_VERSION }} | |
GHCR_ORG: ${{ inputs.ghcr_org }} | |
run: .github/workflows/mirror-calico-images.sh "${GHCR_ORG:-flatcar}" "${CALICO_VERSION}" |