mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-17 09:56:59 +02:00
.github/wf: add mirror-calico action
this action will sync our ghcr calico images with upstream docker images. Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
This commit is contained in:
parent
8ec706219b
commit
7e093370a0
26
sdk_container/src/third_party/coreos-overlay/.github/workflows/mirror-calico.yml
vendored
Normal file
26
sdk_container/src/third_party/coreos-overlay/.github/workflows/mirror-calico.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
name: Sync GHCR Calico images with Docker Hub
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
# run every 12h
|
||||||
|
- cron: '0 */12 * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
get-docker-release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Login to GitHub Container Registry (ghcr)
|
||||||
|
run: echo ${{ secrets.GHCR_PASSWORD }} | docker login ghcr.io -u ${{ secrets.GHCR_USERNAME }} --password-stdin
|
||||||
|
- name: Fetch latest Calico release
|
||||||
|
id: fetch-latest-release
|
||||||
|
run: |
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
git clone https://github.com/projectcalico/calico calico
|
||||||
|
# get latest version
|
||||||
|
version=$(git -C "$_" tag | sort -V | tail -1)
|
||||||
|
|
||||||
|
pushd .github/workflows/
|
||||||
|
./mirror-calico.sh $version
|
||||||
|
popd
|
Loading…
Reference in New Issue
Block a user