Skip to content

Update lock file on Linux #48

Update lock file on Linux

Update lock file on Linux #48

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/parse_lock_file.lua
python3 scripts/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."