Skip to content

Commit

Permalink
Another Claudism
Browse files Browse the repository at this point in the history
  • Loading branch information
reidspencer committed Jan 11, 2025
1 parent 1a308e8 commit 928cfa1
Showing 1 changed file with 10 additions and 36 deletions.
46 changes: 10 additions & 36 deletions .github/workflows/scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,50 +44,24 @@ jobs:
- name: Set Up SBT
uses: sbt/setup-sbt@v1

- name: Debug Token Usage
- name: Configure Coursier Credentials
run: |
# Test direct package download
curl -v -H "Authorization: token $GITHUB_TOKEN" \
"https://maven.pkg.github.com/ossuminc/_/com/ossuminc/sbt-ossuminc_2.12_1.0/0.20.3/sbt-ossuminc-0.20.3.pom" 2>&1 | grep -E "HTTP|Authorization"
# Test with Bearer token
curl -v -H "Authorization: Bearer $GITHUB_TOKEN" \
"https://maven.pkg.github.com/ossuminc/_/com/ossuminc/sbt-ossuminc_2.12_1.0/0.20.3/sbt-ossuminc-0.20.3.pom" 2>&1 | grep -E "HTTP|Authorization"
- name: Debug GitHub Token Access
run: |
echo "Testing GitHub Package access..."
# Test with multiple request forms
for URL in \
"https://maven.pkg.github.com/ossuminc/sbt-ossuminc/com/ossuminc/sbt-ossuminc_2.12_1.0/0.20.3/sbt-ossuminc-0.20.3.pom" \
"https://maven.pkg.github.com/ossuminc/sbt-ossuminc/com/ossuminc/sbt-ossuminc_2.12_1.0/0.20.3/sbt-ossuminc_2.12_1.0-0.20.3.pom" \
"https://api.github.com/user/packages?package_type=maven"
do
echo "Testing $URL"
curl -v \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"$URL" 2>&1 | grep -E "^< HTTP|^< Location|error|message"
done
- name: Debug GitHub Package Redirects
run: |
echo "Testing with redirect following..."
curl -L -v \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
"https://maven.pkg.github.com/ossuminc/sbt-ossuminc/com/ossuminc/sbt-ossuminc_2.12_1.0/0.20.3/sbt-ossuminc-0.20.3.pom" \
2>&1 | grep -E "^< HTTP|^< Location|error|message"
mkdir -p ~/.config/coursier
echo "realm=GitHub Package Registry
host=maven.pkg.github.com
user=$GITHUB_ACTOR
password=$GITHUB_TOKEN" > ~/.config/coursier/credentials.properties
# Also set specific environment variables for coursier
echo "COURSIER_CREDENTIALS=$HOME/.config/coursier/credentials.properties" >> $GITHUB_ENV
- name: Configure Coursier
run: |
mkdir -p ~/.config/coursier
echo "
repositories:
- central
- maven:https://maven.pkg.github.com/ossuminc
- maven:https://maven.pkg.github.com/ossuminc/sbt-ossuminc
" > ~/.config/coursier/repositories
- name: Debug SBT Resolution
Expand Down

0 comments on commit 928cfa1

Please sign in to comment.