Skip to content

Commit 7f91bc6

Browse files
committed
fix update gradle wrapper GitHub action
The action previously failed: ``` Pushing branch /usr/bin/git push --force-with-lease origin HEAD:refs/heads/gradlew-update-9.5.1 remote: Duplicate header: "Authorization" fatal: unable to access 'https://github.com/TNG/ArchUnit/': The requested URL returned error: 400 Creating Pull Request Error: ❌ Validation Failed: {"resource":"PullRequest","field":"head","code":"invalid"} - https://docs.github.com/rest/pulls/pulls#create-a-pull-request ``` This strongly suggests both checkout and the wrapper-update action are configuring GitHub auth, resulting in two Authorization headers on Git HTTP requests. Fix: Disable persisted credentials in actions/checkout, so only the update action manages auth. Note: Simply dropping the repo-token for the update-gradle-wrapper-action did not work either. Signed-off-by: Manfred Hanke <Manfred.Hanke@tngtech.com>
1 parent 80b5500 commit 7f91bc6

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/update-gradle-wrapper.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ name: Update Gradle Wrapper
33
on:
44
schedule:
55
- cron: "0 0 * * *"
6+
workflow_dispatch:
67

78
jobs:
89
update-gradle-wrapper:
910
runs-on: ubuntu-latest
1011

1112
steps:
1213
- uses: actions/checkout@v6
14+
with:
15+
persist-credentials: false
1316

1417
- name: Install Gradle JDK
1518
uses: actions/setup-java@v5.2.0

0 commit comments

Comments
 (0)