Skip to content

Commit 1e33f0c

Browse files
committed
Revert "Merge pull request git-lfs#4795 from bk2204/actions-checkout-v2"
actions/checkout@v2 "helpfully" overwrites the tag with the data from the ref, erasing the annotated tag, and therefore breaking git describe, which by default only checks annotated tags. Note that every tag except the one for the current head is preserved, so git describe uses an annotation that is based off the most recent tag. This behavior is described in actions/checkout#290. The original reporter claiming that a security fix had been applied has not provided details, and the behavior described should not be a vulnerability in a single-tenant Actions VM. Therefore, revert to actions/checkout@v1 to preserve functionality at the expense of a behavior which does not appear to describe an actual vulnerability. This reverts commit e3893b1, reversing changes made to eb0dc94.
1 parent e07d7fd commit 1e33f0c

File tree

2 files changed

+12
-36
lines changed

2 files changed

+12
-36
lines changed

.github/workflows/ci.yml

+7-21
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ jobs:
1010
go: ['1.17.x']
1111
runs-on: ${{ matrix.os }}
1212
steps:
13-
- uses: actions/checkout@v2
14-
with:
15-
fetch-depth: 0
13+
- uses: actions/checkout@v1
1614
- uses: actions/setup-ruby@v1
1715
- uses: actions/setup-go@v2
1816
with:
@@ -43,9 +41,7 @@ jobs:
4341
go: ['1.13.x', '1.14.x']
4442
runs-on: ubuntu-20.04
4543
steps:
46-
- uses: actions/checkout@v2
47-
with:
48-
fetch-depth: 0
44+
- uses: actions/checkout@v1
4945
- uses: actions/setup-go@v2
5046
with:
5147
go-version: ${{ matrix.go }}
@@ -54,9 +50,7 @@ jobs:
5450
name: Build on Windows
5551
runs-on: windows-latest
5652
steps:
57-
- uses: actions/checkout@v2
58-
with:
59-
fetch-depth: 0
53+
- uses: actions/checkout@v1
6054
- uses: actions/setup-ruby@v1
6155
- uses: actions/setup-go@v2
6256
with:
@@ -112,9 +106,7 @@ jobs:
112106
os: [ubuntu-20.04, macos-latest]
113107
runs-on: ${{ matrix.os }}
114108
steps:
115-
- uses: actions/checkout@v2
116-
with:
117-
fetch-depth: 0
109+
- uses: actions/checkout@v1
118110
- run: git clone -b master https://github.com/git/git.git "$HOME/git"
119111
- run: script/build-git "$HOME/git"
120112
- run: GIT_DEFAULT_HASH=sha256 script/cibuild
@@ -125,19 +117,15 @@ jobs:
125117
os: [ubuntu-20.04, macos-latest]
126118
runs-on: ${{ matrix.os }}
127119
steps:
128-
- uses: actions/checkout@v2
129-
with:
130-
fetch-depth: 0
120+
- uses: actions/checkout@v1
131121
- run: git clone -b v2.0.0 https://github.com/git/git.git "$HOME/git"
132122
- run: script/build-git "$HOME/git"
133123
- run: script/cibuild
134124
build-docker:
135125
name: Build Linux packages
136126
runs-on: ubuntu-20.04
137127
steps:
138-
- uses: actions/checkout@v2
139-
with:
140-
fetch-depth: 0
128+
- uses: actions/checkout@v1
141129
- uses: actions/setup-ruby@v1
142130
- run: git clone https://github.com/git-lfs/build-dockers.git "$HOME/build-dockers"
143131
- run: (cd "$HOME/build-dockers" && ./build_dockers.bsh)
@@ -150,9 +138,7 @@ jobs:
150138
arch: [arm64]
151139
container: [debian_11]
152140
steps:
153-
- uses: actions/checkout@v2
154-
with:
155-
fetch-depth: 0
141+
- uses: actions/checkout@v1
156142
- uses: actions/setup-ruby@v1
157143
- run: |
158144
echo '{"experimental": true}' | sudo tee /etc/docker/daemon.json

.github/workflows/release.yml

+5-15
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ jobs:
1111
matrix:
1212
go: ['1.17.x']
1313
steps:
14-
- uses: actions/checkout@v2
15-
with:
16-
fetch-depth: 0
14+
- uses: actions/checkout@v1
1715
- uses: actions/setup-ruby@v1
1816
- uses: actions/setup-go@v2
1917
with:
@@ -65,9 +63,7 @@ jobs:
6563
matrix:
6664
go: ['1.17.x']
6765
steps:
68-
- uses: actions/checkout@v2
69-
with:
70-
fetch-depth: 0
66+
- uses: actions/checkout@v1
7167
- uses: actions/setup-ruby@v1
7268
- uses: actions/setup-go@v2
7369
with:
@@ -103,9 +99,7 @@ jobs:
10399
matrix:
104100
go: ['1.17.x']
105101
steps:
106-
- uses: actions/checkout@v2
107-
with:
108-
fetch-depth: 0
102+
- uses: actions/checkout@v1
109103
- uses: actions/setup-ruby@v1
110104
- uses: actions/setup-go@v2
111105
with:
@@ -131,9 +125,7 @@ jobs:
131125
name: Build Linux Packages
132126
runs-on: ubuntu-20.04
133127
steps:
134-
- uses: actions/checkout@v2
135-
with:
136-
fetch-depth: 0
128+
- uses: actions/checkout@v1
137129
- uses: actions/setup-ruby@v1
138130
- run: gem install packagecloud-ruby
139131
- run: git clone https://github.com/git-lfs/build-dockers.git "$HOME/build-dockers"
@@ -151,9 +143,7 @@ jobs:
151143
arch: [arm64]
152144
container: [debian_11]
153145
steps:
154-
- uses: actions/checkout@v2
155-
with:
156-
fetch-depth: 0
146+
- uses: actions/checkout@v1
157147
- uses: actions/setup-ruby@v1
158148
- run: |
159149
echo '{"experimental": true}' | sudo tee /etc/docker/daemon.json

0 commit comments

Comments
 (0)