Skip to content

Commit fa47ba2

Browse files
authored
Merge pull request #1415 from square/sedwards/pr-target
1413: Check for `APP_ID` conditionally
2 parents 9056cc7 + 8ea38d4 commit fa47ba2

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/kotlin.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
# to be triggered again.
5252
- name: Generate App Token
5353
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2
54+
if: ${{ vars.APP_ID != '' }}
5455
id: app-token
5556
with:
5657
app-id: ${{ vars.APP_ID }}
@@ -62,7 +63,7 @@ jobs:
6263
check-task: connectedCheckShardMatrixYamlCheck checkVersionIsSnapshot
6364
fix-task: connectedCheckShardMatrixYamlUpdate checkVersionIsSnapshot
6465
write-cache-key: build-logic
65-
access-token: ${{ steps.app-token.outputs.token }}
66+
access-token: ${{ steps.app-token.outputs.token || '' }}
6667

6768
artifacts-check:
6869
name: ArtifactsCheck
@@ -75,6 +76,7 @@ jobs:
7576
# to be triggered again.
7677
- name: Generate App Token
7778
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2
79+
if: ${{ vars.APP_ID != '' }}
7880
id: app-token
7981
with:
8082
app-id: ${{ vars.APP_ID }}
@@ -86,7 +88,7 @@ jobs:
8688
check-task: artifactsCheck
8789
fix-task: artifactsDump
8890
write-cache-key: build-logic
89-
access-token: ${{ steps.app-token.outputs.token }}
91+
access-token: ${{ steps.app-token.outputs.token || '' }}
9092

9193
dependency-guard:
9294
name: Dependency Guard
@@ -98,6 +100,7 @@ jobs:
98100
# to be triggered again.
99101
- name: Generate App Token
100102
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2
103+
if: ${{ vars.APP_ID != '' }}
101104
id: app-token
102105
with:
103106
app-id: ${{ vars.APP_ID }}
@@ -111,7 +114,7 @@ jobs:
111114
check-task: dependencyGuard --refresh-dependencies
112115
fix-task: dependencyGuardBaseline --refresh-dependencies
113116
write-cache-key: build-logic
114-
access-token: ${{ steps.app-token.outputs.token }}
117+
access-token: ${{ steps.app-token.outputs.token || '' }}
115118

116119
ktlint:
117120
name: KtLint
@@ -123,6 +126,7 @@ jobs:
123126
# to be triggered again.
124127
- name: Generate App Token
125128
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2
129+
if: ${{ vars.APP_ID != '' }}
126130
id: app-token
127131
with:
128132
app-id: ${{ vars.APP_ID }}
@@ -136,7 +140,7 @@ jobs:
136140
check-task: ktLintCheck
137141
fix-task: ktLintFormat
138142
write-cache-key: build-logic
139-
access-token: ${{ steps.app-token.outputs.token }}
143+
access-token: ${{ steps.app-token.outputs.token || '' }}
140144

141145
api-check:
142146
name: Api check
@@ -148,6 +152,7 @@ jobs:
148152
# to be triggered again.
149153
- name: Generate App Token
150154
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2
155+
if: ${{ vars.APP_ID != '' }}
151156
id: app-token
152157
with:
153158
app-id: ${{ vars.APP_ID }}
@@ -161,7 +166,7 @@ jobs:
161166
check-task: apiCheck
162167
fix-task: apiDump
163168
write-cache-key: build-logic
164-
access-token: ${{ steps.app-token.outputs.token }}
169+
access-token: ${{ steps.app-token.outputs.token || '' }}
165170

166171
android-lint:
167172
name: Android Lint

0 commit comments

Comments
 (0)