docbrown/.github/workflows/buildkite.yml
Joe Doss 67342a4edf
Add github.event.comment.author_association == 'CONTRIBUTOR' to if statement (#11822)
This should be the last PR to get the `/ci` and `/rebase` commands working in
GitHub Actions. The issue is that our membership settings for `forem/forem` have
everyone set to 'CONTRIBUTOR' instead of 'MEMBER' or 'OWNER'.

Adding github.event.comment.author_association == 'CONTRIBUTOR' should fix this
issue.

I also cleaned up all action files to make the main name of the workflow as
succinct as possible to better organize the left menut of the GitHub Actions
page.

This PR won't fix the issues with the "Run forem/build-containers pipeline"
job in buildkite.yml but I will address those issues in another  PR.
2020-12-09 08:36:57 -06:00

29 lines
1.3 KiB
YAML

name: Buildkite
on:
issue_comment:
types: [created]
jobs:
add_ci_label:
name: "Add CI label to pull request"
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/ci') && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'CONTRIBUTOR')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ secrets.github_token }}
labels: ci
build_containers:
name: "Run forem/build-containers pipeline"
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/ci') && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'CONTRIBUTOR')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jdoss/trigger-pipeline-action@c1c77c83b3c16b03b474bc2e1ce6eb36dbde7f3d
env:
BUILDKITE_API_ACCESS_TOKEN: ${{ secrets.buildkite_api_access_token }}
PIPELINE: "forem/build-containers"
PULL_REQUEST_ID: ${{github.event.issue.number}}