File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change 8
8
timeout-minutes : 10
9
9
runs-on : ubuntu-latest
10
10
steps :
11
- - uses : jirutka/setup-alpine@v1
12
- with :
13
- branch : latest-stable
14
- packages : >
15
- python3
16
- jq
17
-
18
11
- name : Checkout
19
12
uses : actions/checkout@v4
20
13
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
+
21
23
- name : Update dependencies
22
24
run : |
25
+ ls -la $PWD/static/sbin/
23
26
JSON=$( cat dependencies.json )
24
27
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}-//" )
26
29
JSON=$( echo $JSON | jq '.[$package] = $version' --arg package $PACKAGE --arg version $VERSION )
27
30
done
28
31
echo $JSON | python -m json.tool > dependencies.json
29
- shell : alpine.sh --root {0}
30
32
31
33
- name : Create PR
32
34
uses : peter-evans/create-pull-request@v7
You can’t perform that action at this time.
0 commit comments