VAULT-17736 Add GHA to add community contributed label if coming from a fork #3
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: Add community contributed label | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
# Runs on PRs to main | |
branches: | |
- main | |
jobs: | |
add-community-contributed-label: | |
# Only run if this is coming from a fork of Vault | |
if: ${{ github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }} | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: write | |
steps: | |
- name: checkout | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- name: add label | |
uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf #v1.1.3 | |
with: | |
labels: community-contributed-pr | |
github_token: ${{secrets.GITHUB_TOKEN}} |