Remove Un-necessary tries to mark execution complete when it has already been cancelled #453
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Dependabot Auto Merge | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
branches: | |
- main | |
paths-ignore: | |
- "**.md" | |
repository_dispatch: | |
types: [ok-to-test] | |
jobs: | |
trigger-circleci: | |
runs-on: ubuntu-latest | |
if: github.actor == 'dependabot[bot]' | |
steps: | |
- name: Trigger CircleCI Pipeline | |
run: .circleci/trigger_pipeline.sh | |
env: | |
BRANCH: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.event.ref }} | |
CIRCLE_TOKEN: ${{ secrets.CIRCLE_CI_TOKEN }} | |
auto-merge: | |
runs-on: ubuntu-latest | |
needs: trigger-circleci | |
steps: | |
- name: Auto merge PR | |
uses: actions/github-script@v3 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const mergePayload = { | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
pull_number: context.payload.pull_request.number, | |
merge_method: 'squash' | |
}; | |
github.pulls.merge(mergePayload); |