Update TGS DMAPI #459
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 TGS DMAPI | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
jobs: | |
update-dmapi: | |
runs-on: ubuntu-latest | |
name: Update the TGS DMAPI | |
steps: | |
- name: Generate App Token | |
id: app-token-generation | |
uses: actions/create-github-app-token@v1 | |
with: | |
app-id: ${{ secrets.APP_ID }} | |
private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
- name: Clone | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ steps.app-token-generation.outputs.token }} | |
- name: Branch | |
run: | | |
git branch -f tgs-dmapi-update | |
git checkout tgs-dmapi-update | |
git reset --hard master | |
- name: Apply DMAPI update | |
uses: tgstation/tgs-dmapi-updater@v2 | |
with: | |
header-path: 'code/__DEFINES/tgs.dm' | |
library-path: 'code/modules/tgs' | |
- name: Commit and Push | |
continue-on-error: true | |
run: | | |
git config user.name "${{ secrets.APP_PUBLIC_NAME }}[bot]" | |
git config user.email "${{ secrets.APP_PUBLIC_ID }}+${{ secrets.APP_PUBLIC_NAME }}[bot]@users.noreply.github.com" | |
git add . | |
git commit -m 'Update TGS DMAPI' | |
git push -f -u origin tgs-dmapi-update | |
- name: Create Pull Request | |
uses: repo-sync/pull-request@v2 | |
if: ${{ success() }} | |
with: | |
source_branch: "tgs-dmapi-update" | |
destination_branch: "master" | |
pr_title: "Automatic TGS DMAPI Update" | |
pr_body: "This pull request updates the TGS DMAPI to the latest version. Please note any breaking or unimplemented changes before merging." | |
pr_label: "Tools" | |
pr_allow_empty: false | |
github_token: ${{ steps.app-token-generation.outputs.token }} |