Skip to content

Commit 4988995

Browse files
authored
Merge pull request #4743 from estesp/fix-ci
[release/1.4] Fix GH Actions CI deprecations
2 parents 882e396 + 0a3488c commit 4988995

1 file changed

Lines changed: 15 additions & 72 deletions

File tree

.github/workflows/ci.yml

Lines changed: 15 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ jobs:
3131
- name: Set env
3232
shell: bash
3333
run: |
34-
echo "::set-env name=GOPATH::${{ github.workspace }}"
35-
echo "::add-path::${{ github.workspace }}/bin"
34+
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
35+
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
3636
3737
- name: Checkout
3838
uses: actions/checkout@v2
@@ -60,71 +60,14 @@ jobs:
6060
timeout-minutes: 5
6161

6262
steps:
63-
#
64-
# Install Go
65-
#
66-
- name: Install Go
67-
uses: actions/setup-go@v1
68-
with:
69-
go-version: '1.15.5'
70-
71-
- name: Set env
72-
shell: bash
73-
run: |
74-
echo "::set-env name=GOPATH::${{ github.workspace }}"
75-
echo "::add-path::${{ github.workspace }}/bin"
76-
77-
#
78-
# Checkout repos
79-
#
80-
- name: Checkout this repo
81-
uses: actions/checkout@v2
63+
- uses: actions/checkout@v2
8264
with:
8365
path: src/github.com/containerd/containerd
8466
fetch-depth: 100
8567

86-
- name: Checkout project repo
87-
uses: actions/checkout@v2
68+
- uses: containerd/project-checks@v1
8869
with:
89-
repository: containerd/project
90-
path: src/github.com/containerd/project
91-
92-
#
93-
# Go get dependencies
94-
#
95-
- name: Install dependencies
96-
env:
97-
GO111MODULE: off
98-
run: |
99-
go get -u github.com/vbatts/git-validation
100-
go get -u github.com/kunalkushwaha/ltag
101-
go get -u github.com/LK4D4/vndr
102-
103-
#
104-
# DCO / File headers / Vendor directory validation
105-
#
106-
- name: DCO
107-
env:
108-
GITHUB_COMMIT_URL: ${{ github.event.pull_request.commits_url }}
109-
DCO_VERBOSITY: "-q"
110-
DCO_RANGE: ""
111-
working-directory: src/github.com/containerd/containerd
112-
run: |
113-
set -x
114-
if [ -z "${GITHUB_COMMIT_URL}" ]; then
115-
DCO_RANGE=$(jq -r '.after + "..HEAD"' ${GITHUB_EVENT_PATH})
116-
else
117-
DCO_RANGE=$(curl ${GITHUB_COMMIT_URL} | jq -r '.[0].parents[0].sha + "..HEAD"')
118-
fi
119-
../project/script/validate/dco
120-
121-
- name: Headers
122-
run: ../project/script/validate/fileheader ../project/
123-
working-directory: src/github.com/containerd/containerd
124-
125-
- name: Vendor
126-
run: ../project/script/validate/vendor
127-
working-directory: src/github.com/containerd/containerd
70+
working-directory: src/github.com/containerd/containerd
12871

12972
#
13073
# Protobuf checks
@@ -143,8 +86,8 @@ jobs:
14386
- name: Set env
14487
shell: bash
14588
run: |
146-
echo "::set-env name=GOPATH::${{ github.workspace }}"
147-
echo "::add-path::${{ github.workspace }}/bin"
89+
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
90+
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
14891
14992
- name: Checkout
15093
uses: actions/checkout@v2
@@ -190,8 +133,8 @@ jobs:
190133
- name: Set env
191134
shell: bash
192135
run: |
193-
echo "::set-env name=GOPATH::${{ github.workspace }}"
194-
echo "::add-path::${{ github.workspace }}/bin"
136+
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
137+
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
195138
196139
- name: Checkout
197140
uses: actions/checkout@v2
@@ -227,8 +170,8 @@ jobs:
227170
- name: Set env
228171
shell: bash
229172
run: |
230-
echo "::set-env name=GOPATH::${{ github.workspace }}"
231-
echo "::add-path::${{ github.workspace }}/bin"
173+
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
174+
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
232175
233176
- name: Checkout
234177
uses: actions/checkout@v2
@@ -259,8 +202,8 @@ jobs:
259202
- name: Set env
260203
shell: bash
261204
run: |
262-
echo "::set-env name=GOPATH::${{ github.workspace }}"
263-
echo "::add-path::${{ github.workspace }}/src/github.com/containerd/containerd/bin"
205+
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
206+
echo "${{ github.workspace }}/src/github.com/containerd/containerd/bin" >> $GITHUB_PATH
264207
265208
- name: Checkout containerd
266209
uses: actions/checkout@v2
@@ -330,8 +273,8 @@ jobs:
330273
- name: Set env
331274
shell: bash
332275
run: |
333-
echo "::set-env name=GOPATH::${{ github.workspace }}"
334-
echo "::add-path::${{ github.workspace }}/bin"
276+
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
277+
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
335278
336279
- name: Checkout containerd
337280
uses: actions/checkout@v2

0 commit comments

Comments
 (0)