From 14526a2233afad64be89388de16cb052b517ba44 Mon Sep 17 00:00:00 2001 From: Phil Estes Date: Thu, 3 Dec 2020 09:23:23 -0500 Subject: [PATCH] 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 --- .github/workflows/ci.yml | 38 ++------------------------------------ Makefile | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 36 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e394891..0dff642 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/Makefile b/Makefile index e51b429..1da4a55 100644 --- a/Makefile +++ b/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