Fix autorun code-gen script

This commit is contained in:
Charles Giessen 2022-03-23 12:13:51 -06:00 committed by Charles Giessen
parent 25eff41755
commit 2ca3a7b03b

View File

@ -15,32 +15,44 @@
# The purpose of this script is to automatically run the autogen code every week and submit a PR to include the changes # The purpose of this script is to automatically run the autogen code every week and submit a PR to include the changes
name: Run autogen
on: on:
schedule: schedule:
- cron: '0 0 * * 2' - cron: '0 0 * * 2'
workflow_dispatch: workflow_dispatch:
jobs: jobs:
test_schedule: run_autogen:
name: Test schedule name: Run autogen
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install python package 'xmltodict'
run: pip install xmltodict
- name: Check out repository code - name: Check out repository code
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
fetch-depth: 2 fetch-depth: 2
- name: Run dispatch generator - name: Run dispatch generator
run: echo "python script/generate_dispatch.py --auto" run: python script/generate_dispatch.py --auto
- name: Diff source to see if anything changed - name: Diff source to see if anything changed
id: git-diff id: git-diff
run: echo "::set-output name=git-diff::$(git diff --quiet HEAD~0 || echo true)" run: echo "::set-output name=git-diff::$(git diff --quiet HEAD~0 || echo true)"
- name: pull-request - name: pull-request
uses: repo-sync/pull-request@v2 uses: peter-evans/create-pull-request@v4
if: ${{ steps.git-diff.outputs.git-diff == 'true' }} if: ${{ steps.git-diff.outputs.git-diff == 'true' }}
with: with:
destination_branch: "develop" commit-message: Update to latest Vulkan-Headers
github_token: ${{ secrets.GITHUB_TOKEN }} title: Update to latest Vulkan-Headers
pr_title: "[auto] Update repo to latest Vulkan-Headers" branch: run-autogen
base: master
delete-branch: true