Skip to content

Commit

Permalink
Disable safe.directory git checks in the container image
Browse files Browse the repository at this point in the history
  • Loading branch information
WojciechMazur committed Dec 10, 2024
1 parent c61897d commit 3d0b033
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
4 changes: 3 additions & 1 deletion .github/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ RUN apt-get update && \
openjdk-21-jdk-headless && \
(curl -fsSL https://deb.nodesource.com/setup_18.x | bash -) && \
apt-get install -y nodejs && \
apt-get install -y zip unzip
apt-get install -y zip unzip && \
# Ensure Git can do stuff in the working directory
git config --system --add safe.directory '*'


# Install sbt
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ 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 -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 @@ -133,7 +132,6 @@ jobs:

- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/scala3/scala3
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 @@ -190,7 +188,6 @@ jobs:

- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/scala3/scala3
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 @@ -229,7 +226,6 @@ jobs:
- name: Reset existing repo
shell: cmd
run: |
git config --global --add safe.directory /__w/scala3/scala3
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 @@ -273,7 +269,6 @@ jobs:
- name: Reset existing repo
shell: cmd
run: |
git config --global --add safe.directory /__w/scala3/scala3
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 @@ -319,7 +314,6 @@ jobs:

- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/scala3/scala3
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 @@ -374,7 +368,6 @@ 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 -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 @@ -391,7 +384,6 @@ jobs:

- name: Test
run: |
git config --global --add safe.directory /__w/scala3/scala3
git submodule sync
git submodule update --init --recursive --jobs 7
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestA"
Expand Down Expand Up @@ -431,7 +423,6 @@ 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 -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 @@ -448,7 +439,6 @@ jobs:

- name: Test
run: |
git config --global --add safe.directory /__w/scala3/scala3
git submodule sync
git submodule update --init --recursive --jobs 7
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestB"
Expand Down Expand Up @@ -488,7 +478,6 @@ 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 -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 @@ -505,7 +494,6 @@ jobs:

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

- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/scala3/scala3
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 @@ -593,7 +580,6 @@ jobs:

- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/scala3/scala3
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 @@ -648,7 +634,6 @@ 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 -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 @@ -706,7 +691,6 @@ jobs:
steps:
- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/scala3/scala3
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 @@ -723,7 +707,6 @@ jobs:

- name: Generate Website
run: |
git config --global --add safe.directory /__w/scala3/scala3
./project/scripts/genDocs -doc-snapshot
- name: Deploy Website to https://dotty.epfl.ch
Expand Down Expand Up @@ -764,7 +747,6 @@ 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 -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

0 comments on commit 3d0b033

Please sign in to comment.