Skip to content

disable workflow for merge queue #80

disable workflow for merge queue

disable workflow for merge queue #80

Workflow file for this run

# Workflow to check if a user is eligible to contribute or needs to sign the CLA
name: CLA Check
on:
# because the cla workflow will run on worflows generated from forks, they do not have access to secrets
# pull_request_target only runs the workflow on the master branch but allows access to secrets
pull_request_target:
branches:
- 'master'
- 'main'
pull_request:
merge_group:
# we do not need this workflow to run on merge_group because its whole purpose is to check if the PR is mergeable
# to test changes to this workflow, it needs to be manually run on the specific branch
workflow_dispatch:
jobs:
check-membership:
name: Check Membership
runs-on: ubuntu-latest
# Dont run this workflow if it was triggered by one of these bots
# Don't run it during a merge queue, as it can't correctly identify the actor
if: |

Check failure on line 24 in .github/workflows/check_cla.yml

View workflow run for this annotation

GitHub Actions / CLA Check

Invalid workflow file

The workflow is not valid. .github/workflows/check_cla.yml (Line: 24, Col: 10): Unexpected symbol: 'merge_group''. Located at position 114 within expression: (contains(fromJson('["dependabot[bot]", "github-actions[bot]"), github.actor) == false) || github.event_name != 'merge_group'
(contains(fromJson('["dependabot[bot]", "github-actions[bot]"), github.actor) == false) ||
github.event_name != 'merge_group'
outputs:
is_member: ${{ steps.check-membership.outputs.is_member}}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
repository: 'dfinity/public-workflows'
- name: Check Membership
id: check-membership
uses: ./reusable_workflows/check_membership/check_membership/
with:
github-token: ${{ secrets.CLA_READ_ORG_MEMBERSHIP }}
check-external-contributions:
name: Check External Contributions
runs-on: ubuntu-latest
needs: check-membership
if: ${{ needs.check-membership.outputs.is_member != 'true' && needs.check-membership.result == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
repository: 'dfinity/public-workflows'
- name: Check if accepting external contributions
id: accepts_external_contrib
uses: ./reusable_workflows/check_membership/check_external_contrib/
- name: Checkout
uses: actions/checkout@v3
- name: Close Pull Request
id: close_pr
if: ${{ steps.accepts_external_contrib.outputs.accepts_contrib != 'true' }}
run: |
message="This repository does not accept external contributions yet.
We are therefore closing this Pull Request, thank you for your understanding.
— The DFINITY Foundation"
gh pr close ${{ github.event.number }} --comment "$message"
env:
GH_TOKEN: ${{ github.token }}
- name: Add Label
uses: actions-ecosystem/action-add-labels@v1
if: ${{ steps.accepts_external_contrib.outputs.accepts_contrib != 'false' }}
with:
labels: external-contributor
- name: Checkout
uses: actions/checkout@v3
if: ${{ steps.accepts_external_contrib.outputs.accepts_contrib != 'false' }}
with:
repository: 'dfinity/repositories-open-to-contributions'
- name: Check CLA
id: check-cla
uses: ./reusable_workflows/check_cla/check_cla_pr/
if: ${{ steps.accepts_external_contrib.outputs.accepts_contrib != 'false' }}
with:
github-token: ${{ secrets.CLA_COMMENT_ON_PRS }}