-
Notifications
You must be signed in to change notification settings - Fork 5
57 lines (48 loc) · 1.57 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
51
52
53
54
55
56
57
name: Update dependencies list
on:
push:
paths-ignore:
- 'docs/**'
- '.github/ISSUE_TEMPLATE/**'
- '.github/pull_request_template.md'
- '.github/workflows/build-debug.yml'
- '.github/workflows/clang-format-check.yml'
- '.github/workflows/publish-release.yml'
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.5'
actions-cache-folder: .xmake-cache-W${{ steps.cache_key.outputs.key }}
- name: Update dependencies list
run: |
xmake repo --update
xmake l xmake/scripts/parse_lock_file.lua
xmake l xmake/scripts/generate_deps_list.lua
- 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."