Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Commit 803f44b

Browse files
committed
github: Enable github actions
This PR enables github actions for the packaging repository. Fixes #1182 Signed-off-by: Gabriela Cervantes <[email protected]>
1 parent f174503 commit 803f44b

File tree

2 files changed

+46
-24
lines changed

2 files changed

+46
-24
lines changed

.github/workflows/main.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
on: ["pull_request"]
2+
name: Static checks
3+
jobs:
4+
test:
5+
strategy:
6+
matrix:
7+
go-version: [1.13.x, 1.14.x, 1.15.x]
8+
os: [ubuntu-18.04]
9+
runs-on: ${{ matrix.os }}
10+
env:
11+
GO111MODULE: off
12+
TRAVIS: "true"
13+
TRAVIS_BRANCH: ${{ github.base_ref }}
14+
TRAVIS_PULL_REQUEST_BRANCH: ${{ github.head_ref }}
15+
TRAVIS_PULL_REQUEST_SHA : ${{ github.event.pull_request.head.sha }}
16+
steps:
17+
- name: Install Go
18+
uses: actions/setup-go@v2
19+
with:
20+
go-version: ${{ matrix.go-version }}
21+
- name: Setup GOPATH
22+
run: |
23+
gopath_org=$(go env GOPATH)/src/github.com/kata-containers/
24+
mkdir -p ${gopath_org}
25+
ln -s ${PWD} ${gopath_org}
26+
echo "TRAVIS_BRANCH: ${TRAVIS_BRANCH}"
27+
echo "TRAVIS_PULL_REQUEST_BRANCH: ${TRAVIS_PULL_REQUEST_BRANCH}"
28+
echo "TRAVIS_PULL_REQUEST_SHA: ${TRAVIS_PULL_REQUEST_SHA}"
29+
echo "TRAVIS: ${TRAVIS}"
30+
- name: Checkout code
31+
uses: actions/checkout@v2
32+
with:
33+
fetch-depth: 0
34+
- name: Setup travis references
35+
run: |
36+
echo "TRAVIS_BRANCH=${TRAVIS_BRANCH:-$(echo $GITHUB_REF | awk 'BEGIN { FS = \"/\" } ; { print $3 }')}"
37+
- name: Setup
38+
run: |
39+
packaging_repo=$(go env GOPATH)/src/github.com/kata-containers/packaging
40+
pushd ${packaging_repo}
41+
GOPATH=$(go env GOPATH) .ci/setup.sh
42+
- name: Running static checks
43+
run: |
44+
packaging_repo=$(go env GOPATH)/src/github.com/kata-containers/packaging
45+
pushd ${packaging_repo}
46+
GOPATH=$(go env GOPATH) .ci/static-checks.sh github.com/kata-containers/packaging

.travis.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)