-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow to check for steam app updates
- Loading branch information
1 parent
94e67e1
commit 2bbbb88
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: "Update Package Locks" | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 10 * * 0" # https://crontab.guru/#0_10_*_*_0 | ||
jobs: | ||
update_packages: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Install Nix | ||
uses: cachix/install-nix-action@v20 | ||
- name: Install steamcmd | ||
# TODO should we use nix to install steamcmd? | ||
run: | | ||
sudo add-apt-repository multiverse; sudo dpkg --add-architecture i386; sudo apt update | ||
sudo apt install steamcmd | ||
- name: Update package locks | ||
run: | | ||
nix run .#update-servers | ||
CHANGES=$(git status --porcelain) | ||
echo "changes=${CHANGES}" >> $GITHUB_OUTPUT | ||
create_pull_request: | ||
runs-on: ubuntu-latest | ||
needs: update_packages | ||
if: ${{ needs.update_packages.outputs.changes != ''}} | ||
steps: | ||
- name: Create commit | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Actions" | ||
git switch -c update_package_lock_action | ||
git add . | ||
git commit -m "chore: Update package locks" | ||
git push origin update_package_lock_action --force | ||
- name: Create Pull Request | ||
run: | | ||
gh pr create \ | ||
-B master \ | ||
-H update_package_lock_action \ | ||
--title 'chore: update package' \ | ||
--body ' | ||
Update branches to latest builds and import new builds. | ||
### Tasks for reviewer: | ||
- [ ] Ensure all automated tests still pass | ||
- [ ] Update `version` field of newly imported builds with version number used in-game | ||
Created by Github action' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|