-
Notifications
You must be signed in to change notification settings - Fork 29
41 lines (37 loc) · 1.13 KB
/
dependencies.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Update dependencies
on:
schedule:
- cron: '0 10 * * *'
workflow_dispatch:
jobs:
updates:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: jirutka/setup-alpine@v1
with:
branch: latest-stable
packages: >
python3
jq
- name: Checkout
uses: actions/checkout@v4
- name: Update dependencies
run: |
JSON=$( cat dependencies.json )
for PACKAGE in $( echo $JSON | jq -r 'keys | .[]' ); do
VERSION=$( apk list "$PACKAGE" | awk '{ print $1 }' | sed -e "s/^${PACKAGE}-//" )
JSON=$( echo $JSON | jq '.[$package] = $version' --arg package $PACKAGE --arg version $VERSION )
done
echo $JSON | python -m json.tool > dependencies.json
shell: alpine.sh --root {0}
- name: Create PR
uses: peter-evans/create-pull-request@v7
with:
commit-message: "chore(deps): update dependencies.json"
branch: features/update-dependencies
title: Update APK packages
body: Updated dependencies.json
delete-branch: true
labels: dependencies
signoff: true