Skip to content

Commit

Permalink
[GitHub CI] Remove build approval step (TextureGroup#1631)
Browse files Browse the repository at this point in the history
In TextureGroup#1627 I introduced an approval step that is meant to block PRs from forked repos unless they're labeled as "CI approved" by a maintainer. Turned out it doesn't work. When a label is added, a pull_request event with "labeled" as its action is fired but GitHub CI didn't restart the workflow. My guess is it checked the PR's commit and branch and determined that nothing has changed. Here is what the doc says: "A workflow runs on a specific version of code in your repository, determined by the commit SHA and Git ref" (https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events).

This diff removes the label check so all PRs are automatically built. Here are the current usage limits in case we run into them: https://help.github.com/en/articles/workflow-syntax-for-github-actions#usage-limits
  • Loading branch information
nguyenhuy authored and matthewd1234 committed Aug 25, 2019
1 parent 4c2e4a3 commit f286726
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,6 @@ name: CI
on: [push, pull_request]

jobs:
build-approval:
name: Build approval
runs-on: macOS-10.14
steps:
- name: Block if a pull request from a forked repository isn't from, and isn't labeled by, a maintainer
if: github.event_name == 'pull_request' && !contains('OWNER, MEMBER, COLLABORATOR', github.event.pull_request.author_association) && !contains(github.event.pull_request.labels.*.name, 'CI approved')
run: exit 255
- name: Approved!
if: failure() == false
run: exit 0
buildsh:
strategy:
matrix:
Expand All @@ -36,7 +26,6 @@ jobs:
name: Build examples (examples-pt4)
name: ${{ matrix.name }}
runs-on: macOS-10.14
needs: build-approval
steps:
- name: Checkout the Git repository
uses: actions/checkout@v1
Expand Down

0 comments on commit f286726

Please sign in to comment.