-
Notifications
You must be signed in to change notification settings - Fork 5
50 lines (41 loc) · 1.3 KB
/
update-deps-list.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
41
42
43
44
45
46
47
48
49
50
name: Update dependencies list
on:
push:
branches:
- main
jobs:
update-deps-list:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Get current date as package key
id: cache_key
run: echo "key=$(date +'%W')" >> $GITHUB_OUTPUT
shell: bash
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: '2.9.3'
actions-cache-folder: .xmake-cache-W${{ steps.cache_key.outputs.key }}
- name: Update dependencies list
run: |
xmake repo --update
xmake l xmake/parse_lock_file.lua
python3 generate_deps_list.py
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
id: commit_action
with:
commit_message: Update dependencies list
file_pattern: docs/dependencies.md
- name: Run if changes have been detected
if: steps.commit_action.outputs.changes_detected == 'true'
run: echo "Dependencies list has been updated."
- name: Run if no changes have been detected
if: steps.commit_action.outputs.changes_detected == 'false'
run: echo "No changes detected in dependencies list."