From 2ca3a7b03b3cdf3c55ae5da736e3491c75f4fcfa Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Wed, 23 Mar 2022 12:13:51 -0600 Subject: [PATCH] Fix autorun code-gen script --- .github/workflows/run_autogen.yml | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/run_autogen.yml b/.github/workflows/run_autogen.yml index e28e764..af63540 100644 --- a/.github/workflows/run_autogen.yml +++ b/.github/workflows/run_autogen.yml @@ -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 +name: Run autogen + on: schedule: - cron: '0 0 * * 2' workflow_dispatch: jobs: - test_schedule: - name: Test schedule + run_autogen: + name: Run autogen runs-on: ubuntu-latest 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 uses: actions/checkout@v2 with: fetch-depth: 2 - 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 id: git-diff run: echo "::set-output name=git-diff::$(git diff --quiet HEAD~0 || echo true)" - name: pull-request - uses: repo-sync/pull-request@v2 + uses: peter-evans/create-pull-request@v4 if: ${{ steps.git-diff.outputs.git-diff == 'true' }} with: - destination_branch: "develop" - github_token: ${{ secrets.GITHUB_TOKEN }} - pr_title: "[auto] Update repo to latest Vulkan-Headers" \ No newline at end of file + commit-message: Update to latest Vulkan-Headers + title: Update to latest Vulkan-Headers + branch: run-autogen + base: master + delete-branch: true