Skip to content

Commit

Permalink
Use GITHUB_WORKSPACE and GITHUB_REPOSITORY instead of hard-coded values
Browse files Browse the repository at this point in the history
  • Loading branch information
WojciechMazur committed Jan 28, 2025
1 parent 8e366a2 commit c189755
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
## Workaround for https://github.com/actions/runner/issues/2033 (See https://github.com/scala/scala3/pull/19720)
- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/scala3/scala3
git config --global --add safe.directory $GITHUB_WORKSPACE
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Checkout cleanup script
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:

- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/scala3/scala3
git config --global --add safe.directory $GITHUB_WORKSPACE
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Checkout cleanup script
Expand Down Expand Up @@ -168,7 +168,7 @@ jobs:
- name: Reset existing repo
shell: cmd
run: |
git config --global --add safe.directory /__w/scala3/scala3
git config --global --add safe.directory $GITHUB_WORKSPACE
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Git Checkout
Expand Down Expand Up @@ -212,7 +212,7 @@ jobs:
- name: Reset existing repo
shell: cmd
run: |
git config --global --add safe.directory /__w/scala3/scala3
git config --global --add safe.directory $GITHUB_WORKSPACE
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Git Checkout
Expand Down Expand Up @@ -254,7 +254,7 @@ jobs:

- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/scala3/scala3
git config --global --add safe.directory $GITHUB_WORKSPACE
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Checkout cleanup script
Expand Down Expand Up @@ -301,7 +301,7 @@ jobs:
run: echo "/usr/lib/jvm/java-8-openjdk-amd64/bin" >> $GITHUB_PATH
- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/scala3/scala3
git config --global --add safe.directory $GITHUB_WORKSPACE
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Checkout cleanup script
Expand All @@ -318,7 +318,7 @@ jobs:

- name: Test
run: |
git config --global --add safe.directory /__w/scala3/scala3
git config --global --add safe.directory $GITHUB_WORKSPACE
git submodule sync
git submodule update --init --recursive --jobs 7
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestA"
Expand Down Expand Up @@ -355,7 +355,7 @@ jobs:
run: echo "/usr/lib/jvm/java-8-openjdk-amd64/bin" >> $GITHUB_PATH
- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/scala3/scala3
git config --global --add safe.directory $GITHUB_WORKSPACE
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Checkout cleanup script
Expand All @@ -372,7 +372,7 @@ jobs:

- name: Test
run: |
git config --global --add safe.directory /__w/scala3/scala3
git config --global --add safe.directory $GITHUB_WORKSPACE
git submodule sync
git submodule update --init --recursive --jobs 7
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestB"
Expand Down Expand Up @@ -409,7 +409,7 @@ jobs:
run: echo "/usr/lib/jvm/java-8-openjdk-amd64/bin" >> $GITHUB_PATH
- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/scala3/scala3
git config --global --add safe.directory $GITHUB_WORKSPACE
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Checkout cleanup script
Expand All @@ -426,7 +426,7 @@ jobs:

- name: Test
run: |
git config --global --add safe.directory /__w/scala3/scala3
git config --global --add safe.directory $GITHUB_WORKSPACE
git submodule sync
git submodule update --init --recursive --jobs 7
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestC"
Expand Down Expand Up @@ -462,7 +462,7 @@ jobs:

- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/scala3/scala3
git config --global --add safe.directory $GITHUB_WORKSPACE
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Checkout cleanup script
Expand Down Expand Up @@ -511,7 +511,7 @@ jobs:

- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/scala3/scala3
git config --global --add safe.directory $GITHUB_WORKSPACE
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Checkout cleanup script
Expand Down Expand Up @@ -559,7 +559,7 @@ jobs:
run: echo "/usr/lib/jvm/java-8-openjdk-amd64/bin" >> $GITHUB_PATH
- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/scala3/scala3
git config --global --add safe.directory $GITHUB_WORKSPACE
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Checkout cleanup script
Expand Down Expand Up @@ -623,7 +623,7 @@ jobs:
steps:
- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/scala3/scala3
git config --global --add safe.directory $GITHUB_WORKSPACE
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Checkout cleanup script
Expand All @@ -640,7 +640,7 @@ jobs:

- name: Generate Website
run: |
git config --global --add safe.directory /__w/scala3/scala3
git config --global --add safe.directory $GITHUB_WORKSPACE
./project/scripts/genDocs -doc-snapshot
- name: Deploy Website to dotty-website
Expand Down Expand Up @@ -678,7 +678,7 @@ jobs:
run: echo "/usr/lib/jvm/java-8-openjdk-amd64/bin" >> $GITHUB_PATH
- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/scala3/scala3
git config --global --add safe.directory $GITHUB_WORKSPACE
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/scala/scala3" && git reset --hard FETCH_HEAD || true
- name: Checkout cleanup script
Expand Down
2 changes: 1 addition & 1 deletion project/scripts/cmdScaladocTests
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ DOTTY_NONBOOTSTRAPPED_VERSION=$(eval $DOTTY_NONBOOTSTRAPPED_VERSION_COMMAND | ta
DOTTY_BOOTSTRAPPED_VERSION_COMMAND="$SBT \"eval println(Build.dottyVersion)\""
DOTTY_BOOTSTRAPPED_VERSION=$(eval $DOTTY_BOOTSTRAPPED_VERSION_COMMAND | tail -n 2 | head -n 1)

SOURCE_LINKS_REPOSITORY="scala/scala3"
SOURCE_LINKS_REPOSITORY="${GITHUB_REPOSITORY:-scala/scala3}"
SOURCE_LINKS_VERSION="${GITHUB_SHA:-$DOTTY_BOOTSTRAPPED_VERSION}"

"$SBT" "scaladoc/generateTestcasesDocumentation" > "$tmp" 2>&1 || echo "generated testcases project with sbt"
Expand Down

0 comments on commit c189755

Please sign in to comment.