Fix GitHub Actions script

Use pre-baked project checks to solve existing GH action's use of
deprecated env setting method.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
This commit is contained in:
Phil Estes 2020-12-03 09:23:23 -05:00
parent 8118063b95
commit 14526a2233
No known key found for this signature in database
GPG Key ID: 0F386284C03A1162
2 changed files with 16 additions and 36 deletions

View File

@ -13,46 +13,12 @@ jobs:
timeout-minutes: 5
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go
- name: Setup Go binary path
shell: bash
run: |
echo "::set-env name=GOPATH::${{ github.workspace }}"
echo "::add-path::${{ github.workspace }}/bin"
- name: Check out code
uses: actions/checkout@v2
with:
path: src/github.com/containerd/containerd.io
fetch-depth: 25
- name: Checkout project
uses: actions/checkout@v2
- uses: containerd/project-checks@v1.0.1
with:
repository: containerd/project
path: src/github.com/containerd/project
- name: Install dependencies
env:
GO111MODULE: off
run: |
go get -u github.com/vbatts/git-validation
- name: Check DCO/whitespace/commit message
env:
GITHUB_COMMIT_URL: ${{ github.event.pull_request.commits_url }}
DCO_VERBOSITY: "-q"
DCO_RANGE: ""
working-directory: src/github.com/containerd/containerd.io
run: |
if [ -z "${GITHUB_COMMIT_URL}" ]; then
DCO_RANGE=$(jq -r '.before +".."+ .after' ${GITHUB_EVENT_PATH})
else
DCO_RANGE=$(curl ${GITHUB_COMMIT_URL} | jq -r '.[0].parents[0].sha +".."+ .[-1].sha')
fi
../project/script/validate/dco
working-directory: src/github.com/containerd/containerd.io

View File

@ -1,3 +1,17 @@
# Copyright The containerd Authors.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
clean:
rm -rf public resources