Skip to content

Commit 03c371a

Browse files
committed
gha: replace uses of deprecated "set-env", "add-path"
Signed-off-by: Derek McGowan <[email protected]>
1 parent f2cc351 commit 03c371a

1 file changed

Lines changed: 15 additions & 56 deletions

File tree

.github/workflows/ci.yml

Lines changed: 15 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -8,64 +8,23 @@ on:
88

99
jobs:
1010

11-
checks:
12-
name: CI Checks
11+
#
12+
# Project checks
13+
#
14+
project:
15+
name: Project Checks
1316
runs-on: ubuntu-18.04
1417
timeout-minutes: 5
15-
steps:
16-
17-
- name: Set up Go
18-
uses: actions/setup-go@v1
19-
with:
20-
go-version: 1.15
21-
id: go
22-
23-
- name: Setup Go binary path
24-
shell: bash
25-
run: |
26-
echo "::set-env name=GOPATH::${{ github.workspace }}"
27-
echo "::add-path::${{ github.workspace }}/bin"
28-
29-
- name: Check out code
30-
uses: actions/checkout@v2
31-
with:
32-
path: src/github.com/containerd/continuity
33-
fetch-depth: 25
34-
35-
- name: Checkout project
36-
uses: actions/checkout@v2
37-
with:
38-
repository: containerd/project
39-
path: src/github.com/containerd/project
40-
41-
- name: Install dependencies
42-
env:
43-
GO111MODULE: off
44-
run: |
45-
go get -u github.com/vbatts/git-validation
46-
go get -u github.com/kunalkushwaha/ltag
4718

48-
- name: Check DCO/whitespace/commit message
49-
env:
50-
GITHUB_COMMIT_URL: ${{ github.event.pull_request.commits_url }}
51-
DCO_VERBOSITY: "-q"
52-
DCO_RANGE: ""
53-
working-directory: src/github.com/containerd/continuity
54-
run: |
55-
if [ -z "${GITHUB_COMMIT_URL}" ]; then
56-
DCO_RANGE=$(jq -r '.before +".."+ .after' ${GITHUB_EVENT_PATH})
57-
else
58-
DCO_RANGE=$(curl ${GITHUB_COMMIT_URL} | jq -r '.[0].parents[0].sha +".."+ .[-1].sha')
59-
fi
60-
../project/script/validate/dco
61-
62-
- name: Check file headers
63-
run: ../project/script/validate/fileheader ../project/
64-
working-directory: src/github.com/containerd/continuity
19+
steps:
20+
- uses: actions/checkout@v2
21+
with:
22+
path: src/github.com/containerd/continuity
23+
fetch-depth: 100
6524

66-
- name: Check vendor
67-
run: ../project/script/validate/vendor
68-
working-directory: src/github.com/containerd/continuity
25+
- uses: containerd/project-checks@v1
26+
with:
27+
working-directory: src/github.com/containerd/continuity
6928

7029
tests:
7130
name: CI Tests
@@ -86,8 +45,8 @@ jobs:
8645
- name: Setup Go binary path
8746
shell: bash
8847
run: |
89-
echo "::set-env name=GOPATH::${{ github.workspace }}"
90-
echo "::add-path::${{ github.workspace }}/bin"
48+
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
49+
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
9150
9251
- name: Git line endings
9352
shell: bash

0 commit comments

Comments
 (0)