Skip to content

Fix update-deps-list action #2

Fix update-deps-list action

Fix update-deps-list action #2

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."