CI - update node packages and build #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI - update node packages and build | |
on: | |
schedule: | |
- cron: '0 1 * * 5' | |
workflow_dispatch: | |
jobs: | |
update-node-pacakges: | |
name: update node packages and build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up env π οΈ | |
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | |
- name: Checkout ποΈ | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up Node.js βοΈ | |
uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
- name: Print versions | |
run: |- | |
echo $CURRENT_DATE | |
echo "node version: $(node --version) $(which node)" | |
echo "npw version: $(npm --version) $(which npm)" | |
- name: Install ncu π | |
run: npm install npm-check-updates | |
- name: Upgrade packages π | |
run: npm run update:modules | |
- name: Build π | |
run: npm run build | |
- name: Commit and create PR π | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.WORKFLOW_TOKEN }} | |
title: 'build(deps): Upgrade NPM packages (automated)' | |
branch: 'build-deps-upgrade-npm-packages-automated-${{ env.CURRENT_DATE }}' | |
commit-message: 'build(deps): upgrade NPM packages (automated)' | |
assignees: Rabbid76 | |
draft: false |