Skip to content

Commit d7aad31

Browse files
committed
Refactor GitHub workflows to inherit secrets for Unity credentials and GitHub token
1 parent 10ff0ac commit d7aad31

File tree

8 files changed

+16
-40
lines changed

8 files changed

+16
-40
lines changed

.github/workflows/2019.4.40f1_editor.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,4 @@ jobs:
1515
projectPath: './'
1616
unityVersion: '2019.4.40f1'
1717
testMode: 'editmode'
18-
unityEmail: ${{ secrets.UNITY_EMAIL }}
19-
unityPassword: ${{ secrets.UNITY_PASSWORD }}
20-
unityLicense: ${{ secrets.UNITY_LICENSE }}
21-
githubToken: ${{ secrets.GITHUB_TOKEN }}
18+
secrets: inherit

.github/workflows/2020.3.40f1_editor.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,4 @@ jobs:
1515
projectPath: './'
1616
unityVersion: '2020.3.40f1'
1717
testMode: 'editmode'
18-
unityEmail: ${{ secrets.UNITY_EMAIL }}
19-
unityPassword: ${{ secrets.UNITY_PASSWORD }}
20-
unityLicense: ${{ secrets.UNITY_LICENSE }}
21-
githubToken: ${{ secrets.GITHUB_TOKEN }}
18+
secrets: inherit

.github/workflows/2021.3.45f1_editor.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,4 @@ jobs:
1515
projectPath: './'
1616
unityVersion: '2021.3.45f1'
1717
testMode: 'editmode'
18-
unityEmail: ${{ secrets.UNITY_EMAIL }}
19-
unityPassword: ${{ secrets.UNITY_PASSWORD }}
20-
unityLicense: ${{ secrets.UNITY_LICENSE }}
21-
githubToken: ${{ secrets.GITHUB_TOKEN }}
18+
secrets: inherit

.github/workflows/2022.3.57f1_editor.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,4 @@ jobs:
1515
projectPath: './'
1616
unityVersion: '2022.3.57f1'
1717
testMode: 'editmode'
18-
unityEmail: ${{ secrets.UNITY_EMAIL }}
19-
unityPassword: ${{ secrets.UNITY_PASSWORD }}
20-
unityLicense: ${{ secrets.UNITY_LICENSE }}
21-
githubToken: ${{ secrets.GITHUB_TOKEN }}
18+
secrets: inherit

.github/workflows/2023.1.20f1_editor.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,4 @@ jobs:
1515
projectPath: './'
1616
unityVersion: '2023.1.20f1'
1717
testMode: 'editmode'
18-
unityEmail: ${{ secrets.UNITY_EMAIL }}
19-
unityPassword: ${{ secrets.UNITY_PASSWORD }}
20-
unityLicense: ${{ secrets.UNITY_LICENSE }}
21-
githubToken: ${{ secrets.GITHUB_TOKEN }}
18+
secrets: inherit

.github/workflows/2023.2.20f1_editor.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,4 @@ jobs:
1515
projectPath: './'
1616
unityVersion: '2023.2.20f1'
1717
testMode: 'editmode'
18-
unityEmail: ${{ secrets.UNITY_EMAIL }}
19-
unityPassword: ${{ secrets.UNITY_PASSWORD }}
20-
unityLicense: ${{ secrets.UNITY_LICENSE }}
21-
githubToken: ${{ secrets.GITHUB_TOKEN }}
18+
secrets: inherit

.github/workflows/6000.0.37f1_editor.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,4 @@ jobs:
1515
projectPath: './'
1616
unityVersion: '6000.0.37f1'
1717
testMode: 'editmode'
18-
unityEmail: ${{ secrets.UNITY_EMAIL }}
19-
unityPassword: ${{ secrets.UNITY_PASSWORD }}
20-
unityLicense: ${{ secrets.UNITY_LICENSE }}
21-
githubToken: ${{ secrets.GITHUB_TOKEN }}
18+
secrets: inherit

.github/workflows/main.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,15 @@ on:
1212
testMode:
1313
required: true
1414
type: string
15-
unityEmail:
15+
secrets:
16+
UNITY_LICENSE:
1617
required: true
17-
type: string
18-
unityPassword:
18+
UNITY_EMAIL:
1919
required: true
20-
type: string
21-
unityLicense:
20+
UNITY_PASSWORD:
2221
required: true
23-
type: string
24-
githubToken:
22+
GITHUB_TOKEN:
2523
required: true
26-
type: string
2724

2825
jobs:
2926
test:
@@ -42,13 +39,13 @@ jobs:
4239
- uses: game-ci/unity-test-runner@v4
4340
id: tests
4441
env:
45-
UNITY_LICENSE: ${{ inputs.unityLicense }}
46-
UNITY_EMAIL: ${{ inputs.unityEmail }}
47-
UNITY_PASSWORD: ${{ inputs.unityPassword }}
42+
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
43+
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
44+
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
4845
with:
4946
projectPath: ${{ inputs.projectPath }}
5047
unityVersion: ${{ inputs.unityVersion }}
5148
testMode: ${{ inputs.testMode }}
5249
artifactsPath: ${{ inputs.testMode }}-artifacts
53-
githubToken: ${{ inputs.githubToken }}
50+
githubToken: ${{ secrets.GITHUB_TOKEN }}
5451
checkName: ${{ inputs.unityVersion }} ${{ inputs.testMode }} Test Results

0 commit comments

Comments
 (0)