Skip to content

Commit dd326f8

Browse files
committed
update git and run as root
1 parent 34bf8a1 commit dd326f8

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

.github/workflows/test.yml

+26-2
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,33 @@ jobs:
1313
sparse-checkout-cone-mode: true
1414
fetch-depth: 1
1515
fetch-tags: false
16+
- name: "Print git --version"
17+
run: git --version
1618
- name: "Print .git/config"
1719
run: cat .git/config
1820
- name: "dotnet build"
1921
run: dotnet build
2022
test2:
2123
name: "actions/runner:2.316.0 + actions/[email protected]"
2224
runs-on: ubuntu-latest
23-
container: ghcr.io/actions/actions-runner:2.316.0
25+
container:
26+
image: ghcr.io/actions/actions-runner:2.316.0
27+
options: --user 0
2428
steps:
29+
- name: "Print git --version"
30+
run: git --version
31+
- name: "Update git"
32+
run: |
33+
add-apt-repository ppa:git-core/ppa -y
34+
apt-get update
35+
apt-get install git -y
2536
- uses: actions/[email protected]
2637
with:
2738
sparse-checkout-cone-mode: true
2839
fetch-depth: 1
2940
fetch-tags: false
41+
- name: "Print git --version"
42+
run: git --version
3043
- name: "Print .git/config"
3144
run: cat .git/config
3245
- uses: actions/setup-dotnet@v4
@@ -37,13 +50,24 @@ jobs:
3750
test3:
3851
name: "actions/runner:2.316.0 + actions/[email protected]"
3952
runs-on: ubuntu-latest
40-
container: ghcr.io/actions/actions-runner:2.316.0
53+
container:
54+
image: ghcr.io/actions/actions-runner:2.316.0
55+
options: --user 0
4156
steps:
57+
- name: "Print git --version"
58+
run: git --version
59+
- name: "Update git"
60+
run: |
61+
add-apt-repository ppa:git-core/ppa -y
62+
apt-get update
63+
apt-get install git -y
4264
- uses: actions/[email protected]
4365
with:
4466
sparse-checkout-cone-mode: true
4567
fetch-depth: 1
4668
fetch-tags: false
69+
- name: "Print git --version"
70+
run: git --version
4771
- name: "Print .git/config"
4872
run: cat .git/config
4973
- uses: actions/setup-dotnet@v4

0 commit comments

Comments
 (0)