-
Notifications
You must be signed in to change notification settings - Fork 13
49 lines (48 loc) · 1.78 KB
/
sync-calico-version.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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}"