Skip to content

Commit 9abdeed

Browse files
authored
Merge pull request #109 from Mind-Sports-Games/pla-864-update-workflow-check-org-to-not-appear-as-a-job
add org check to workflow
2 parents 9d7e562 + a761deb commit 9abdeed

File tree

2 files changed

+32
-6
lines changed

2 files changed

+32
-6
lines changed

.github/workflows/server.yml

+13
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,19 @@ jobs:
1818
openjdk14:
1919
runs-on: ubuntu-latest
2020
steps:
21+
- name: Check if organization member
22+
id: check_org_member
23+
uses: Mind-Sports-Games/check-org-member@v1.1.0
24+
with:
25+
username: ${{ github.actor }}
26+
token: ${{ secrets.GITHUB_TOKEN }}
27+
- name: Check Failed
28+
if: ${{ steps.check_org_member.outputs.result == 'false' }}
29+
run: |
30+
echo User Does Not Belong to Mind-Sports-Games
31+
exit 1
32+
- name: Check Passed
33+
run: echo The actor is an organization member
2134
- uses: actions/checkout@v4
2235
- uses: actions/cache@v4
2336
with:

.github/workflows/test.yml

+19-6
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,22 @@ jobs:
66
openjdk13:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v4
10-
- uses: actions/setup-java@v4
11-
with:
12-
distribution: temurin
13-
java-version: 17.0.5
14-
- run: sbt compile
9+
- name: Check if organization member
10+
id: check_org_member
11+
uses: Mind-Sports-Games/check-org-member@v1.1.0
12+
with:
13+
username: ${{ github.actor }}
14+
token: ${{ secrets.GITHUB_TOKEN }}
15+
- name: Check Failed
16+
if: ${{ steps.check_org_member.outputs.result == 'false' }}
17+
run: |
18+
echo User Does Not Belong to Mind-Sports-Games
19+
exit 1
20+
- name: Check Passed
21+
run: echo The actor is an organization member
22+
- uses: actions/checkout@v4
23+
- uses: actions/setup-java@v4
24+
with:
25+
distribution: temurin
26+
java-version: 17.0.5
27+
- run: sbt compile

0 commit comments

Comments
 (0)