Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/1.3] cherry-pick: Fix GH Actions CI deprecations #4744

Merged
merged 1 commit into from Nov 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
83 changes: 13 additions & 70 deletions .github/workflows/ci.yml
Expand Up @@ -31,8 +31,8 @@ jobs:
- name: Set env
shell: bash
run: |
echo "::set-env name=GOPATH::${{ github.workspace }}"
echo "::add-path::${{ github.workspace }}/bin"
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH

- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -60,71 +60,14 @@ jobs:
timeout-minutes: 5

steps:
#
# Install Go
#
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: '1.13.15'

- name: Set env
shell: bash
run: |
echo "::set-env name=GOPATH::${{ github.workspace }}"
echo "::add-path::${{ github.workspace }}/bin"

#
# Checkout repos
#
- name: Checkout this repo
uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
path: src/github.com/containerd/containerd
fetch-depth: 100

- name: Checkout project repo
uses: actions/checkout@v2
- uses: containerd/project-checks@v1
with:
repository: containerd/project
path: src/github.com/containerd/project

#
# Go get dependencies
#
- name: Install dependencies
env:
GO111MODULE: off
run: |
go get -u github.com/vbatts/git-validation
go get -u github.com/kunalkushwaha/ltag
go get -u github.com/LK4D4/vndr

#
# DCO / File headers / Vendor directory validation
#
- name: DCO
env:
GITHUB_COMMIT_URL: ${{ github.event.pull_request.commits_url }}
DCO_VERBOSITY: "-q"
DCO_RANGE: ""
working-directory: src/github.com/containerd/containerd
run: |
set -x
if [ -z "${GITHUB_COMMIT_URL}" ]; then
DCO_RANGE=$(jq -r '.after + "..HEAD"' ${GITHUB_EVENT_PATH})
else
DCO_RANGE=$(curl ${GITHUB_COMMIT_URL} | jq -r '.[0].parents[0].sha + "..HEAD"')
fi
../project/script/validate/dco

- name: Headers
run: ../project/script/validate/fileheader ../project/
working-directory: src/github.com/containerd/containerd

- name: Vendor
run: ../project/script/validate/vendor
working-directory: src/github.com/containerd/containerd
working-directory: src/github.com/containerd/containerd

#
# Protobuf checks
Expand All @@ -143,8 +86,8 @@ jobs:
- name: Set env
shell: bash
run: |
echo "::set-env name=GOPATH::${{ github.workspace }}"
echo "::add-path::${{ github.workspace }}/bin"
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH

- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -190,8 +133,8 @@ jobs:
- name: Set env
shell: bash
run: |
echo "::set-env name=GOPATH::${{ github.workspace }}"
echo "::add-path::${{ github.workspace }}/bin"
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH

- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -227,8 +170,8 @@ jobs:
- name: Set env
shell: bash
run: |
echo "::set-env name=GOPATH::${{ github.workspace }}"
echo "::add-path::${{ github.workspace }}/bin"
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH

- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -269,8 +212,8 @@ jobs:
- name: Set env
shell: bash
run: |
echo "::set-env name=GOPATH::${{ github.workspace }}"
echo "::add-path::${{ github.workspace }}/bin"
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH

- name: Checkout containerd
uses: actions/checkout@v2
Expand Down