From e876b5f9d7b4c34a49125de5aa1020b9ab96ad0e Mon Sep 17 00:00:00 2001 From: Cat Chen Date: Thu, 13 Jun 2024 23:00:30 -0700 Subject: [PATCH] Reusing the same Dependabot triggering workflow --- .github/workflows/build-dependabot.yml | 16 ---------------- .github/workflows/build.yml | 4 ++++ .../{test-dependabot.yml => dependabot.yml} | 6 +++--- .github/workflows/eslint.yml | 10 ++++++++++ .github/workflows/test.yml | 2 +- 5 files changed, 18 insertions(+), 20 deletions(-) delete mode 100644 .github/workflows/build-dependabot.yml rename .github/workflows/{test-dependabot.yml => dependabot.yml} (76%) diff --git a/.github/workflows/build-dependabot.yml b/.github/workflows/build-dependabot.yml deleted file mode 100644 index 74ae90f5..00000000 --- a/.github/workflows/build-dependabot.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Build for Dependabot - -on: - push: - branches: [main] - pull_request: - branches: [main, '[0-9]+-[0-9]+-*'] - workflow_dispatch: - -jobs: - build-dependabot: - name: Build for Dependabot - if: ${{ !startsWith(github.head_ref, 'workflows/tests/') && github.actor == 'dependabot[bot]' }} - runs-on: ubuntu-latest - steps: - - run: exit 0 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cd094f86..08bab8b7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,10 @@ on: branches: [main] pull_request: branches: [main, '[0-9]+-[0-9]+-*'] + workflow_run: + workflows: ['Dependabot'] + types: + - completed workflow_dispatch: workflow_call: inputs: diff --git a/.github/workflows/test-dependabot.yml b/.github/workflows/dependabot.yml similarity index 76% rename from .github/workflows/test-dependabot.yml rename to .github/workflows/dependabot.yml index 04841eae..192d26e2 100644 --- a/.github/workflows/test-dependabot.yml +++ b/.github/workflows/dependabot.yml @@ -1,4 +1,4 @@ -name: Test for Dependabot +name: Dependabot on: pull_request: @@ -6,8 +6,8 @@ on: workflow_dispatch: jobs: - dependabot-test: - name: Test for Dependabot + dependabot: + name: Dependabot if: ${{ !startsWith(github.head_ref, 'workflows/tests/') && github.actor == 'dependabot[bot]' }} runs-on: ubuntu-latest steps: diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index 1a0f496b..9a8cf2ae 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -5,7 +5,17 @@ on: branches: [main] pull_request: branches: [main, '[0-9]+-[0-9]+-*'] + workflow_run: + workflows: ['Dependabot'] + types: + - completed workflow_dispatch: + workflow_call: + inputs: + ref: + description: 'Checkout a different git ref instead of the SHA from the GitHub event.' + required: false + type: string jobs: eslint: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cd057da7..93d3dd97 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,7 +6,7 @@ on: pull_request: branches: [main, '[0-9]+-[0-9]+-*'] workflow_run: - workflows: ['Test for Dependabot'] + workflows: ['Dependabot'] types: - completed workflow_dispatch: