Skip to content

Commit

Permalink
get package version from wolfi APKINDEX
Browse files Browse the repository at this point in the history
  • Loading branch information
sgalsaleh committed Dec 14, 2023
1 parent 9f67d08 commit f2ccb33
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 17 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/image-deps-updater.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,21 @@ jobs:
- name: Get tags
id: get-tags
run: |
minio_yaml=$(curl -s --fail --show-error https://raw.githubusercontent.com/wolfi-dev/os/main/minio.yaml)
minio_version=$(echo "$minio_yaml" | grep "version:" | awk '{print $2}' | tr -d '\n')
minio_epoch=$(echo "$minio_yaml" | grep "epoch:" | awk '{print $2}' | tr -d '\n')
curl -LO --fail --show-error https://packages.wolfi.dev/os/x86_64/APKINDEX.tar.gz
tar -xzvf APKINDEX.tar.gz
rqlite_yaml=$(curl -s --fail --show-error https://raw.githubusercontent.com/wolfi-dev/os/main/rqlite.yaml)
rqlite_version=$(echo "$rqlite_yaml" | grep "version:" | awk '{print $2}' | tr -d '\n')
rqlite_epoch=$(echo "$rqlite_yaml" | grep "epoch:" | awk '{print $2}' | tr -d '\n')
dex_yaml=$(curl -s --fail --show-error https://raw.githubusercontent.com/wolfi-dev/os/main/dex.yaml)
dex_version=$(echo "$dex_yaml" | grep "version:" | awk '{print $2}' | tr -d '\n')
dex_epoch=$(echo "$dex_yaml" | grep "epoch:" | awk '{print $2}' | tr -d '\n')
minio_version=$(cat APKINDEX | grep -A1 "^P:minio$" | tail -n 1 | sed -n -e 's/V://p' | tr -d '\n')
rqlite_version=$(cat APKINDEX | grep -A1 "^P:rqlite$" | tail -n 1 | sed -n -e 's/V://p' | tr -d '\n')
dex_version=$(cat APKINDEX | grep -A1 "^P:dex$" | tail -n 1 | sed -n -e 's/V://p' | tr -d '\n')
sed "s/__MINIO_VERSION__/$minio_version/g" deploy/minio/apko.yaml.tmpl > deploy/minio/apko.yaml
sed "s/__RQLITE_VERSION__/$rqlite_version/g" deploy/rqlite/apko.yaml.tmpl > deploy/rqlite/apko.yaml
sed "s/__DEX_VERSION__/$dex_version/g" deploy/dex/apko.yaml.tmpl > deploy/dex/apko.yaml
{
echo "minio-tag=$minio_version-$minio_epoch"
echo "rqlite-tag=$rqlite_version-$rqlite_epoch"
echo "dex-tag=$dex_version-$dex_epoch"
echo "minio-tag=$minio_version"
echo "rqlite-tag=$rqlite_version"
echo "dex-tag=$dex_version"
} >> "$GITHUB_OUTPUT"
- name: Build and push minio image
Expand Down
2 changes: 1 addition & 1 deletion deploy/dex/apko.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ contents:
keyring:
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
packages:
- dex~__DEX_VERSION__
- dex=__DEX_VERSION__
- gomplate
- bash
- busybox
Expand Down
2 changes: 1 addition & 1 deletion deploy/minio/apko.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ contents:
keyring:
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
packages:
- minio~__MINIO_VERSION__
- minio=__MINIO_VERSION__
- mc
- bash
- busybox
Expand Down
4 changes: 2 additions & 2 deletions deploy/rqlite/apko.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ contents:
keyring:
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
packages:
- rqlite~__RQLITE_VERSION__
- rqlite-oci-entrypoint
- rqlite=__RQLITE_VERSION__
- rqlite-oci-entrypoint=__RQLITE_VERSION__
- bash
- busybox
- wolfi-baselayout
Expand Down

0 comments on commit f2ccb33

Please sign in to comment.