From 1fbfb891d246894b0c84acebd15462a8d1207a83 Mon Sep 17 00:00:00 2001 From: Usman Aziz Date: Thu, 31 Oct 2024 20:08:24 +0000 Subject: [PATCH] Formatting fixes. --- .github/on-pr.yml | 17 +++++++++++++++++ .github/workflows/nightly-uplift.yml | 14 +++++++------- .github/workflows/on-pr.yml | 5 ++++- 3 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 .github/on-pr.yml diff --git a/.github/on-pr.yml b/.github/on-pr.yml new file mode 100644 index 00000000..76a781f8 --- /dev/null +++ b/.github/on-pr.yml @@ -0,0 +1,17 @@ +name: On PR + +on: + workflow_dispatch: + pull_request: + branches: [ "main" ] + +jobs: + pre-commit: + uses: ./.github/workflows/pre-commit.yml + secrets: inherit + spdx: + uses: ./.github/workflows/spdx.yml + secrets: inherit + build-and-test: + uses: ./.github/workflows/build-and-test.yml + secrets: inherit diff --git a/.github/workflows/nightly-uplift.yml b/.github/workflows/nightly-uplift.yml index 63e57cb1..e80e7952 100644 --- a/.github/workflows/nightly-uplift.yml +++ b/.github/workflows/nightly-uplift.yml @@ -8,8 +8,8 @@ on: - cron: '0 8 * * *' # Runs at 08:00 UTC every day workflow_dispatch: # Manual trigger -jobs: - uplift-pr: +jobs: + uplift-pr: runs-on: ubuntu-latest env: @@ -47,20 +47,20 @@ jobs: base: main commit-message: "Uplift ${{ env.SUBMODULE_PATH }} to ${{ env.SUBMODULE_VERSION }} ${{ env.TODAY }}" title: "Uplift ${{ env.SUBMODULE_PATH }} to ${{ env.SUBMODULE_VERSION }} ${{ env.TODAY }}" - body: "This PR uplifts the ${{ env.SUBMODULE_PATH }} to the ${{ env.SUBMODULE_VERSION }}" + body: "This PR uplifts the ${{ env.SUBMODULE_PATH }} to the ${{ env.SUBMODULE_VERSION }}" labels: uplift delete-branch: true token: ${{ secrets.GH_TOKEN }} - + - name: Approve Pull Request if: ${{ steps.create-pr.outputs.pull-request-number }} env: GITHUB_TOKEN: ${{ secrets.GH_APPROVE_TOKEN }} run: | echo "Pull Request Number - ${{ steps.create-pr.outputs.pull-request-number }}" - echo "Pull Request URL - ${{ steps.create-pr.outputs.pull-request-url }}" - gh pr review ${{ steps.create-pr.outputs.pull-request-number }} --approve - + echo "Pull Request URL - ${{ steps.create-pr.outputs.pull-request-url }}" + gh pr review ${{ steps.create-pr.outputs.pull-request-number }} --approve + - name: Enable Pull Request Automerge if: ${{ steps.create-pr.outputs.pull-request-number }} run: gh pr merge --squash --auto "${{ steps.create-pr.outputs.pull-request-number }}" diff --git a/.github/workflows/on-pr.yml b/.github/workflows/on-pr.yml index a94f1bb1..76a781f8 100644 --- a/.github/workflows/on-pr.yml +++ b/.github/workflows/on-pr.yml @@ -6,9 +6,12 @@ on: branches: [ "main" ] jobs: + pre-commit: + uses: ./.github/workflows/pre-commit.yml + secrets: inherit spdx: uses: ./.github/workflows/spdx.yml secrets: inherit build-and-test: uses: ./.github/workflows/build-and-test.yml - secrets: inherit \ No newline at end of file + secrets: inherit