Update VPM Dependencies #357
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: Update VPM Dependencies | |
on: | |
push: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
upgrade-vpm-dependencies: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install vrc-get | |
uses: anatawa12/sh-actions/setup-vrc-get@master | |
- name: Add VPM Repos URLs | |
run: | | |
cat repositories.txt | while read repo ; do | |
echo adding repository $repo | |
vrc-get repo add $repo | |
done | |
- name: Check for VPM updates | |
id: check-outdated | |
run: | | |
{ | |
echo 'outdated_text<<EOF' | |
vrc-get outdated | |
echo EOF | |
} >> "$GITHUB_OUTPUT" | |
- name: Upgrade all packages | |
id: run-upgrade | |
if: ${{ steps.check-outdated.outputs.outdated_text != '' }} | |
run: | | |
{ | |
echo 'upgrade_text<<EOF' | |
vrc-get upgrade -y | |
echo EOF | |
} >> "$GITHUB_OUTPUT" | |
- name: Commit changes | |
if: ${{ steps.check-outdated.outputs.outdated_text != '' }} | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: | | |
Auto - Upgrade VPM dependencies | |
Outdated: | |
${{ steps.check-outdated.outputs.outdated_text }} | |
Upgraded: | |
${{ steps.run-upgrade.outputs.upgrade_text }} |