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:
parent
8118063b95
commit
14526a2233
|
@ -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
|
||||
|
|
14
Makefile
14
Makefile
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue