Skip to content

Commit 4b9431b

Browse files
author
Scott Nichols
authored
Merge pull request #5 from n3wscott/update-knative-gomod
Updating all the deps to latest.
2 parents cb008e1 + c0d5876 commit 4b9431b

File tree

2,692 files changed

+172922
-475119
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,692 files changed

+172922
-475119
lines changed

.github/workflows/go-build.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
11+
build:
12+
name: Build
13+
strategy:
14+
matrix:
15+
go-version: [1.13.x, 1.14.x]
16+
platform: [ubuntu-latest]
17+
18+
runs-on: ${{ matrix.platform }}
19+
20+
env:
21+
GOPATH: ${{ github.workspace }}
22+
GO111MODULE: off
23+
24+
steps:
25+
26+
- name: Set up Go ${{ matrix.go-version }}
27+
uses: actions/setup-go@v1
28+
with:
29+
go-version: ${{ matrix.go-version }}
30+
id: go
31+
32+
- name: Check out code onto GOPATH
33+
uses: actions/checkout@v2
34+
with:
35+
fetch-depth: 1
36+
path: ./src/github.com/${{ github.repository }}
37+
38+
- name: Vet
39+
run: go vet github.com/${{ github.repository }}/...
40+
41+
- name: Build
42+
run: go build -v github.com/${{ github.repository }}/...

.github/workflows/go-style.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Code Style
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
11+
lint:
12+
name: Lint
13+
runs-on: ubuntu-latest
14+
15+
env:
16+
GOPATH: ${{ github.workspace }}
17+
GO111MODULE: off
18+
19+
steps:
20+
21+
- name: Set up Go 1.13.x
22+
uses: actions/setup-go@v1
23+
with:
24+
go-version: 1.13.x
25+
id: go
26+
27+
- name: Check out code onto GOPATH
28+
uses: actions/checkout@v2
29+
with:
30+
fetch-depth: 1
31+
path: ./src/github.com/${{ github.repository }}
32+
33+
# TODO: add pretter step
34+
35+
- name: Go Format
36+
shell: bash
37+
run: |
38+
pushd ./src/github.com/${{ github.repository }}
39+
gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -type f -name '*.go' -print)
40+
popd
41+
42+
- name: Verify
43+
shell: bash
44+
run: |
45+
pushd ./src/github.com/${{ github.repository }}
46+
if [[ $(git diff-index --name-only HEAD --) ]]; then
47+
echo "Found diffs in:"
48+
git diff-index --name-only HEAD --
49+
echo "${{ github.repository }} is out of style. Please run go fmt."
50+
exit 1
51+
fi
52+
echo "${{ github.repository }} is formatted correctly."
53+
popd

.github/workflows/go-test.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
11+
test:
12+
name: Test
13+
strategy:
14+
matrix:
15+
go-version: [1.13.x, 1.14.x]
16+
platform: [ubuntu-latest]
17+
18+
runs-on: ${{ matrix.platform }}
19+
20+
env:
21+
GOPATH: ${{ github.workspace }}
22+
GO111MODULE: off
23+
24+
steps:
25+
26+
- name: Set up Go ${{ matrix.go-version }}
27+
uses: actions/setup-go@v1
28+
with:
29+
go-version: ${{ matrix.go-version }}
30+
id: go
31+
32+
- name: Check out code onto GOPATH
33+
uses: actions/checkout@v2
34+
with:
35+
fetch-depth: 1
36+
path: ./src/github.com/${{ github.repository }}
37+
38+
- name: Test
39+
run: go test -race github.com/${{ github.repository }}/...

.github/workflows/release.yaml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
on:
2+
push:
3+
# Sequence of patterns matched against refs/tags
4+
tags:
5+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
6+
7+
name: Create Release
8+
9+
jobs:
10+
11+
ko-resolve:
12+
name: Release ko artifact
13+
runs-on: ubuntu-latest
14+
env:
15+
GOPATH: ${{ github.workspace }}
16+
GO111MODULE: off
17+
KO_DOCKER_REPO: docker.io/n3wscott
18+
19+
steps:
20+
- name: Set up Go 1.13.x
21+
uses: actions/setup-go@v1
22+
with:
23+
go-version: 1.13.x
24+
25+
- name: Add GOPATH/bin to PATH
26+
shell: bash
27+
run: |
28+
echo "::set-env name=GOPATH::$(go env GOPATH)"
29+
echo "::add-path::$(go env GOPATH)/bin"
30+
31+
- name: Setup ko
32+
run: |
33+
GO111MODULE=on go get github.com/google/ko/cmd/ko
34+
docker login -u n3wscott -p ${{ secrets.DOCKERHUB_PASSWORD }}
35+
36+
- name: Check out code onto GOPATH
37+
uses: actions/checkout@v2
38+
with:
39+
fetch-depth: 1
40+
path: ./src/github.com/${{ github.repository }}
41+
42+
- name: Build and Publish images, Produce release artifact.
43+
working-directory: ./src/github.com/${{ github.repository }}
44+
run: |
45+
ko resolve --tags $(basename "${{ github.ref }}" ) -BRf config/ > release.yaml
46+
47+
- name: Create Release
48+
id: create_release
49+
uses: actions/create-release@v1
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
with:
53+
tag_name: ${{ github.ref }}
54+
release_name: Release ${{ github.ref }}
55+
draft: false
56+
prerelease: true
57+
58+
- name: Upload Release Asset
59+
id: upload-release-asset
60+
uses: actions/upload-release-asset@v1
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
with:
64+
upload_url: ${{ steps.create_release.outputs.upload_url }}
65+
asset_path: ./src/github.com/${{ github.repository }}/release.yaml
66+
asset_name: release.yaml
67+
asset_content_type: text/plain

0 commit comments

Comments
 (0)