mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-17 18:06:59 +02:00
.github: find latest calico tag from tigera operator
The mirror-calico workflow has been failing because it currently determines version=v3.22.0-0.dev-typha, which is not the tag used by the individual container images. Rewrite the version logic to determine the version based on what is in the tigera operator manifest. This is the same manifest that we use to deploy calico in mantle. Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This commit is contained in:
parent
df2c3ace99
commit
886b11bf1d
@ -6,7 +6,7 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
get-docker-release:
|
mirror-calico:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@ -17,10 +17,19 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
git clone https://github.com/projectcalico/calico calico
|
tigera_image=$(curl -sSL https://docs.projectcalico.org/manifests/tigera-operator.yaml \
|
||||||
# get latest version
|
| awk '/image:/ && NF == 2 { print $2 }')
|
||||||
version=$(git -C "$_" tag | sort -V | tail -1)
|
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/
|
pushd .github/workflows/
|
||||||
|
for version in $versions; do
|
||||||
./mirror-calico.sh $version
|
./mirror-calico.sh $version
|
||||||
|
done
|
||||||
popd
|
popd
|
||||||
|
Loading…
Reference in New Issue
Block a user