Skip to content

Commit

Permalink
CI: not retrigger CI when PR description is edited + autocancel previ…
Browse files Browse the repository at this point in the history
…ous build (#950)

* remove no longer relevant comment

* trigger CI on default pull request events only

* Auto-cancel previous build workflows

* prettier
  • Loading branch information
librelois authored Nov 3, 2021
1 parent f9207ed commit b795561
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ name: Build
# 2. It includes the PR/Commit text in the action item
# 3. Artifacts are not available between workflows.

# This is only allowing pushes on the moonbeam repo for pull requests.
####### DO NOT CHANGE THIS !! #######
on:
pull_request:
types: [opened, edited, unassigned, synchronize]
push:
branches:
- master
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/cancel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Cancel
on: [push]
jobs:
cancel:
name: "Cancel Previous Build"
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: styfle/cancel-workflow-action@0.9.1
with:
workflow_id: ".github/workflows/build.yml"
all_but_latest: true
access_token: ${{ github.token }}

0 comments on commit b795561

Please sign in to comment.