dl.emersa.it/.forgejo/workflows/dependency_check.yaml

41 lines
1.2 KiB
YAML
Raw Normal View History

name: Update Minor Dependencies and Build Container
2025-02-06 11:09:18 +01:00
on:
schedule:
- cron: '0 0 * * *' # Runs every night at midnight (UTC)
workflow_dispatch: # Allows manual triggering
2025-02-06 11:09:18 +01:00
jobs:
update-dependencies:
2025-02-06 11:13:43 +01:00
runs-on: docker
2025-02-06 11:09:18 +01:00
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
token: ${{ secrets.FORGEJO_TOKEN }} # Make sure to add this token in your repo secrets
2025-02-06 11:09:18 +01:00
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20' # Adjust as needed
2025-02-06 11:09:18 +01:00
- name: Configure npm version
2025-02-06 11:09:18 +01:00
run: npm install
- name: Check and Update Minor Dependencies
run: npx npm-check-updates --target minor -u
2025-02-06 11:09:18 +01:00
- name: Install Updated Dependencies
run: npm install
2025-02-06 11:09:18 +01:00
- name: Commit and Push Changes
run: |
git config --global user.name "forgejo-bot"
git config --global user.email "bot@pweapon.org"
2025-02-07 03:26:05 +01:00
git add package.json || exit 0
git commit -m "chore: update minor dependencies"
git push origin HEAD:${GITHUB_REF#refs/heads/}
env:
GITHUB_TOKEN: ${{ secrets.FORGEJO_TOKEN }}