Skip to content

Commit a605159

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

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

.github/workflows/dependencies.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,27 @@ 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 search apk-tools
21+
22+
2123
- name: Update dependencies
2224
run: |
25+
ls -la $PWD/static/sbin/
2326
JSON=$( cat dependencies.json )
2427
for PACKAGE in $( echo $JSON | jq -r 'keys | .[]' ); do
25-
VERSION=$( apk list "$PACKAGE" | awk '{ print $1 }' | sed -e "s/^${PACKAGE}-//" )
28+
VERSION=$( $PWD/static/sbin/apk.static list "$PACKAGE" | awk '{ print $1 }' | sed -e "s/^${PACKAGE}-//" )
2629
JSON=$( echo $JSON | jq '.[$package] = $version' --arg package $PACKAGE --arg version $VERSION )
2730
done
2831
echo $JSON | python -m json.tool > dependencies.json
29-
shell: alpine.sh --root {0}
3032
3133
- name: Create PR
3234
uses: peter-evans/create-pull-request@v7

0 commit comments

Comments
 (0)