mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-16 17:36:59 +02:00
Merge pull request #1564 from flatcar-linux/jepio/fix-mirror-calico
.github: find latest calico tag when mirroring
This commit is contained in:
commit
bdb48fd89a
@ -6,7 +6,7 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
get-docker-release:
|
||||
mirror-calico:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -17,10 +17,19 @@ jobs:
|
||||
run: |
|
||||
set -ex
|
||||
|
||||
git clone https://github.com/projectcalico/calico calico
|
||||
# get latest version
|
||||
version=$(git -C "$_" tag | sort -V | tail -1)
|
||||
tigera_image=$(curl -sSL https://docs.projectcalico.org/manifests/tigera-operator.yaml \
|
||||
| awk '/image:/ && NF == 2 { print $2 }')
|
||||
tigera_version=${tigera_image##*:}
|
||||
|
||||
versions=$(curl -sSL "https://raw.githubusercontent.com/tigera/operator/${tigera_version}/config/calico_versions.yml" \
|
||||
| awk '/version:/ { print $2 }' \
|
||||
| sort \
|
||||
| uniq)
|
||||
|
||||
echo "Found versions: $versions"
|
||||
|
||||
pushd .github/workflows/
|
||||
./mirror-calico.sh $version
|
||||
for version in $versions; do
|
||||
./mirror-calico.sh $version
|
||||
done
|
||||
popd
|
||||
|
Loading…
Reference in New Issue
Block a user