Skip to content

Commit 0bb5d8f

Browse files
authored
Set junk GITHUB_TOKEN envvar for Scala Steward
The git method is failing because SS clones and CDs into the clone, where the github.token config is unset. So, let's try setting a SHELL variable and hope that its not going to override something important.
1 parent cd38955 commit 0bb5d8f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.github/workflows/scala-steward.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ on:
88

99
name: Launch Scala Steward
1010

11+
env:
12+
# This is required because SBT is configured to look at env:GITHUB_TOKEN or git:github.token or env:SHELL
13+
# to get a token for publishing even when not executing the publish task. Most of the time, SHELL is set
14+
# but apparently not inside GitHub Actions runners. Setting _something invalid_ satisfies the
15+
# GitHub Packages plugin safely and allows the operation to proceed.
16+
SHELL: "/bin/bash"
17+
1118
jobs:
1219
scala-steward:
1320
runs-on: ubuntu-latest
1421
name: Launch Scala Steward
1522
steps:
16-
- name: Configure unused GitHub Token via git
17-
# This is required because SBT is configured to look at env:GITHUB_TOKEN or git:github.token or env:SHELL
18-
# to get a token for publishing even when not executing the publish task. Most of the time, SHELL is set
19-
# but apparently not inside GitHub Actions runners. Setting _something invalid_ satisfies the
20-
# GitHub Packages plugin safely and allows the operation to proceed.
21-
# We also have to initialize the git repo because we're not in a repo context when this runs.
22-
run: git init . && git config github.token unused
2323
- name: Install JDK for Scala Steward use
2424
uses: actions/setup-java@v3
2525
with:

0 commit comments

Comments
 (0)