From d0abd226c760d698df1556eab32035b871794a8d Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Fri, 15 Nov 2024 08:56:55 -0700 Subject: [PATCH] Per dtcenter/METplus#2336, call custom GHA to trigger METplus use case tests when changes are pushed to main_vX.Y and develop branches --- .github/workflows/trigger_metplus.yaml | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/.github/workflows/trigger_metplus.yaml b/.github/workflows/trigger_metplus.yaml index 09c46ec2..de2fb45e 100644 --- a/.github/workflows/trigger_metplus.yaml +++ b/.github/workflows/trigger_metplus.yaml @@ -4,6 +4,7 @@ on: push: branches: - develop + - 'main_v[0-9]+.[0-9]+' paths-ignore: - 'docs/**' - '.github/pull_request_template.md' @@ -16,25 +17,6 @@ jobs: name: Trigger METplus testing workflow runs-on: ubuntu-latest steps: - - name: Print GitHub values for reference - env: - GITHUB_CONTEXT: ${{ toJson(github) }} - run: echo "$GITHUB_CONTEXT" - - uses: actions/github-script@v7 + - uses: dtcenter/metplus-action-trigger-use-cases@v1 with: - github-token: ${{ secrets.METPLUS_BOT_TOKEN }} - script: | - await github.rest.actions.createWorkflowDispatch({ - owner: 'dtcenter', - repo: 'METplus', - workflow_id: 'testing.yml', - ref: 'develop', - inputs: { - repository: '${{ github.repository }}', - ref: '${{ github.ref }}', - actor: '${{ github.actor }}', - sha: '${{ github.sha }}', - pusher_email: '${{ github.event.pusher.email }}' - }, - }); - + token: ${{ secrets.METPLUS_BOT_TOKEN }}