Skip to content

Commit a3c33d6

Browse files
committed
merge branch 'pr-1128'
Josh Dolitsky (1): Switch to GitHub Actions, CODEOWNERS, etc. LGTMs: tianon cyphar Closes #1128
2 parents ab23082 + 0608c1f commit a3c33d6

File tree

7 files changed

+79
-65
lines changed

7 files changed

+79
-65
lines changed

.github/workflows/build-pr.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: build-pr
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
run:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: checkout source code
13+
uses: actions/checkout@master
14+
- name: setup go environment
15+
uses: actions/setup-go@v1
16+
with:
17+
go-version: '1.17.2'
18+
- name: run tests
19+
run: |
20+
export PATH="$(go env GOPATH)/bin:${PATH}"
21+
set -x
22+
make install.tools
23+
24+
# Fix for "cannot find main module" issue
25+
go mod init github.com/opencontainers/runtime-spec
26+
27+
go get -d ./schema/...
28+
make .govet
29+
make .golint
30+
31+
make .gitvalidation
32+
make docs
33+
make -C schema test

.github/workflows/build.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
run:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: checkout source code
13+
uses: actions/checkout@master
14+
- name: setup go environment
15+
uses: actions/setup-go@v1
16+
with:
17+
go-version: '1.17.2'
18+
- name: run tests
19+
run: |
20+
export PATH="$(go env GOPATH)/bin:${PATH}"
21+
set -x
22+
make install.tools
23+
24+
# Fix for "cannot find main module" issue
25+
go mod init github.com/opencontainers/runtime-spec
26+
27+
go get -d ./schema/...
28+
make .govet
29+
make .golint
30+
31+
make .gitvalidation
32+
make docs
33+
make -C schema test

.pullapprove.yml

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

.travis.yml

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

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @crosbymichael @cyphar @dqminh @giuseppe @hqhq @mrunalp @tianon @vbatts

Makefile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11

2-
EPOCH_TEST_COMMIT := 78e6667ae2d67aad100b28ee9580b41b7a24e667
3-
OUTPUT_DIRNAME ?= output
4-
DOC_FILENAME ?= oci-runtime-spec
5-
DOCKER ?= $(shell command -v docker 2>/dev/null)
6-
PANDOC ?= $(shell command -v pandoc 2>/dev/null)
2+
EPOCH_TEST_COMMIT := 78e6667ae2d67aad100b28ee9580b41b7a24e667
3+
OUTPUT_DIRNAME ?= output
4+
DOC_FILENAME ?= oci-runtime-spec
5+
DOCKER ?= $(shell command -v docker 2>/dev/null)
6+
PANDOC ?= $(shell command -v pandoc 2>/dev/null)
7+
PANDOC_IMAGE ?= ghcr.io/opencontainers/pandoc:2.9.2.1-9.fc34.x86_64@sha256:590c5c7aaa6e8e7a4debae7e9102c837daa0c8a76f8f5b5c9831ea5f755e3e95
78
ifeq "$(strip $(PANDOC))" ''
89
ifneq "$(strip $(DOCKER))" ''
910
PANDOC = $(DOCKER) run \
1011
--security-opt label=disable \
11-
-it \
1212
--rm \
1313
-v $(shell pwd)/:/input/:ro \
1414
-v $(shell pwd)/$(OUTPUT_DIRNAME)/:/$(OUTPUT_DIRNAME)/ \
1515
-u $(shell id -u) \
16-
vbatts/pandoc
16+
$(PANDOC_IMAGE)
1717
PANDOC_SRC := /input/
1818
PANDOC_DST := /
1919
endif
@@ -69,11 +69,11 @@ ifeq ($(call ALLOWED_GO_VERSION,1.7,$(HOST_GOLANG_VERSION)),true)
6969
endif
7070

7171

72-
# When this is running in travis, it will only check the travis commit range
72+
# When this is running in GitHub, it will only check the GitHub commit range
7373
.gitvalidation:
7474
@which git-validation > /dev/null 2>/dev/null || (echo "ERROR: git-validation not found. Consider 'make install.tools' target" && false)
75-
ifdef TRAVIS_COMMIT_RANGE
76-
git-validation -q -run short-subject,dangling-whitespace
75+
ifdef GITHUB_SHA
76+
git-validation -q -run DCO,short-subject,dangling-whitespace -range $(GITHUB_SHA)..HEAD
7777
else
7878
git-validation -v -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..HEAD
7979
endif

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Open Container Initiative Runtime Specification
22

3+
[![GitHub Actions status](https://github.com/opencontainers/runtime-spec/workflows/build/badge.svg)](https://github.com/opencontainers/runtime-spec/actions?query=workflow%3Abuild)
4+
35
The [Open Container Initiative][oci] develops specifications for standards on Operating System process and application containers.
46

57
The specification can be found [here](spec.md).

0 commit comments

Comments
 (0)