Skip to content

Commit e3dcf91

Browse files
committed
update workflow
Signed-off-by: Jeroen Simonetti <[email protected]>
1 parent 111bea5 commit e3dcf91

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

.github/workflows/dependencies.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,26 @@ jobs:
88
timeout-minutes: 10
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: jirutka/setup-alpine@v1
12-
with:
13-
branch: latest-stable
14-
packages: >
15-
python3
16-
jq
17-
1811
- name: Checkout
1912
uses: actions/checkout@v4
2013

14+
- name: Download apk.static
15+
run: |
16+
wget -r -np -nH -A "apk-tools-static-*.apk" https://dl-cdn.alpinelinux.org/alpine/latest-stable/main/x86_64/
17+
file=$(ls alpine/latest-stable/main/x86_64/apk-tools-static-*.apk | head -n 1)
18+
mkdir $PWD/static
19+
tar -xC $PWD/static/ -f $file
20+
sudo $PWD/static/sbin/apk.static --arch x86_64 -X https://dl-cdn.alpinelinux.org/alpine/latest-stable/main/ -U --allow-untrusted --root / --initdb
21+
2122
- name: Update dependencies
2223
run: |
24+
ls -la $PWD/static/sbin/
2325
JSON=$( cat dependencies.json )
2426
for PACKAGE in $( echo $JSON | jq -r 'keys | .[]' ); do
25-
VERSION=$( apk list "$PACKAGE" | awk '{ print $1 }' | sed -e "s/^${PACKAGE}-//" )
27+
VERSION=$( $PWD/static/sbin/apk.static list "$PACKAGE" | awk '{ print $1 }' | sed -e "s/^${PACKAGE}-//" )
2628
JSON=$( echo $JSON | jq '.[$package] = $version' --arg package $PACKAGE --arg version $VERSION )
2729
done
2830
echo $JSON | python -m json.tool > dependencies.json
29-
shell: alpine.sh --root {0}
3031
3132
- name: Create PR
3233
uses: peter-evans/create-pull-request@v7

0 commit comments

Comments
 (0)