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

Move from Travis to GitHub Actions #284

Merged
merged 3 commits into from
Jun 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: build-pr

on:
pull_request:
mikebrow marked this conversation as resolved.
Show resolved Hide resolved
branches:
- main

jobs:
run:
runs-on: ubuntu-latest
steps:
- name: checkout source code
uses: actions/checkout@master
- name: setup go environment
uses: actions/setup-go@v1
with:
go-version: '1.16.5'
mikebrow marked this conversation as resolved.
Show resolved Hide resolved
- name: run tests
run: |
export PATH="$(go env GOPATH)/bin:${PATH}"
make install.tools
make .gitvalidation
make docs conformance
23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: build

on:
push:
branches:
- main

jobs:
run:
runs-on: ubuntu-latest
steps:
- name: checkout source code
uses: actions/checkout@master
- name: setup go environment
uses: actions/setup-go@v1
with:
go-version: '1.16.5'
- name: run tests
run: |
export PATH="$(go env GOPATH)/bin:${PATH}"
make install.tools
make .gitvalidation
make docs conformance
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
output
header.html
tags
go.mod
go.sum
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ PANDOC_CONTAINER ?= ghcr.io/opencontainers/pandoc:2.9.2.1-8.fc33.x86_64@sha256:5
ifeq "$(strip $(PANDOC))" ''
ifneq "$(strip $(DOCKER))" ''
PANDOC = $(DOCKER) run \
-it \
--rm \
-v $(shell pwd)/:/input/:ro \
-v $(shell pwd)/$(OUTPUT_DIRNAME)/:/$(OUTPUT_DIRNAME)/ \
Expand All @@ -28,7 +27,6 @@ GOLANGCILINT_CONTAINER ?= ghcr.io/opencontainers/golangci-lint:v1.39.0@sha256:7b
ifeq "$(strip $(GOLANGCILINT))" ''
ifneq "$(strip $(DOCKER))" ''
GOLANGCILINT = $(DOCKER) run \
-it \
--rm \
-v $(shell pwd)/:/input:ro \
-e GOCACHE=/tmp/.cache \
Expand All @@ -48,11 +46,11 @@ FIGURE_FILES :=

test: .gitvalidation

# When this is running in travis, it will only check the travis commit range
# When this is running in GitHub, it will only check the GitHub commit range
.gitvalidation:
@command -v git-validation >/dev/null 2>/dev/null || (echo "ERROR: git-validation not found. Consider 'make install.tools' target" && false)
ifdef TRAVIS_COMMIT_RANGE
git-validation -q -run DCO,short-subject,dangling-whitespace
ifdef GITHUB_SHA
git-validation -q -run DCO,short-subject,dangling-whitespace -range $(GITHUB_SHA)..HEAD
else
git-validation -v -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..HEAD
endif
Expand All @@ -76,7 +74,9 @@ $(OUTPUT_DIRNAME)/$(DOC_FILENAME).html: header.html $(DOC_FILES) $(FIGURE_FILES)
endif

header.html: .tool/genheader.go specs-go/version.go
go mod init && \
rm -f go.mod go.sum && \
go mod init github.com/opencontainers/distribution-spec && \
go get github.com/opencontainers/distribution-spec/specs-go && \
go run .tool/genheader.go > $@

install.tools: .install.gitvalidation
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# OCI Distribution Specification

[![GitHub Actions status](https://github.com/opencontainers/distribution-spec/workflows/build/badge.svg)](https://github.com/opencontainers/distribution-spec/actions?query=workflow%3Abuild)

The OCI Distribution Spec project defines an API protocol to facilitate and standardize the distribution of content.

**[The specification can be found here](spec.md).**
Expand Down