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: Is Organization Member Example | |
on: | |
issues: | |
types: [opened, labeled] | |
pull_request: | |
types: [opened, labeled] | |
jobs: | |
is-member: | |
name: Is org member? | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
id: checkout | |
uses: actions/checkout@v4 | |
- name: Check if organization member | |
id: is_organization_member | |
uses: zuchka/[email protected] | |
env: | |
GH_EVENT_NAME: ${{ toJson(github.event_name) }} | |
GH_REPO: ${{ toJson(github.repository) }} | |
GH_CONTEXT: ${{ toJson(github) }} | |
with: | |
username: ${{ github.event.issue.user.login }} | |
teammates: 20k-ultra|char8|coffee-cup|dbanys|FarazPatankar|gschier|half0wl|JakeCooper|jitachi|melissa-hale|ndneighbor|ohrgaard|pierre-borckmans|railway-bot|tacLog|trif0lium|zuchka | |
- name: Create Comment | |
if: ${{ steps.is_organization_member.outputs.result == 'false' }} | |
run: echo FALSE | |
- name: Create Comment 2 | |
if: ${{ steps.is_organization_member.outputs.result == 'true' }} | |
run: echo TRUE | |
- name: Dump GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: echo "$GITHUB_CONTEXT" | |
- name: Dump job context | |
env: | |
JOB_CONTEXT: ${{ toJson(job) }} | |
run: echo "$JOB_CONTEXT" | |
- name: Dump steps context | |
env: | |
STEPS_CONTEXT: ${{ toJson(steps) }} | |
run: echo "$STEPS_CONTEXT" | |
- name: Dump runner context | |
env: | |
RUNNER_CONTEXT: ${{ toJson(runner) }} | |
run: echo "$RUNNER_CONTEXT" | |
- name: Dump strategy context | |
env: | |
STRATEGY_CONTEXT: ${{ toJson(strategy) }} | |
run: echo "$STRATEGY_CONTEXT" | |
- name: Dump matrix context | |
env: | |
MATRIX_CONTEXT: ${{ toJson(matrix) }} | |
run: echo "$MATRIX_CONTEXT" |