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

[main] Update actions #136

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
4 changes: 2 additions & 2 deletions .github/workflows/knative-boilerplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ jobs:

steps:

- name: Set up Go 1.15.x
- name: Set up Go 1.16.x
uses: actions/setup-go@v2
with:
go-version: 1.15.x
go-version: 1.16.x
id: go

- name: Check out code
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/knative-go-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
name: Build
strategy:
matrix:
go-version: [1.15.x]
go-version: [1.16.x]
platform: [ubuntu-latest]

runs-on: ${{ matrix.platform }}
Expand All @@ -43,7 +43,13 @@ jobs:
- name: Check out code
uses: actions/checkout@v2

- id: go_mod
uses: andstor/file-existence-action@v1
with:
files: go.mod

- name: Build
if: ${{ steps.go_mod.outputs.files_exists == 'true' }}
run: |
tags="$(grep -I -r '// +build' . | \
grep -v '^./vendor/' | \
Expand All @@ -55,5 +61,4 @@ jobs:
tr '\n' ' ')"

echo "Building with tags: ${tags}"
go test -vet=off -tags "${tags}" -run=^$ ./... | grep -v "no test" || true

go test -vet=off -tags "${tags}" -exec echo ./...
2 changes: 1 addition & 1 deletion .github/workflows/knative-go-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
name: Unit Tests
strategy:
matrix:
go-version: [1.15.x]
go-version: [1.16.x]
platform: [ubuntu-latest]

runs-on: ${{ matrix.platform }}
Expand Down
26 changes: 8 additions & 18 deletions .github/workflows/knative-releasability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
env:
#########################################
# Update this section each release. #
RELEASE: 'v0.22'
SLACK_CHANNEL: 'release-22'
RELEASE: 'v0.23'
SLACK_CHANNEL: 'release-23'
#########################################

steps:
Expand All @@ -54,10 +54,10 @@ jobs:
echo "SLACK_WEBHOOK=exists" >> $GITHUB_ENV
fi

- name: Set up Go 1.15.x
- name: Set up Go 1.16.x
uses: actions/setup-go@v2
with:
go-version: 1.15.x
go-version: 1.16.x

- name: Install Dependencies
run: GO111MODULE=on go get knative.dev/test-infra/buoy@main
Expand Down Expand Up @@ -110,25 +110,15 @@ jobs:
# If we don't run `git status` before the "git diff-index" it seems
# to list every file that's been touched by codegen.
git status
FOUND_DIFF=0
for x in $(git diff-index --name-only HEAD --); do
if [ "$(basename $x)" = "go.mod" ]; then
continue
elif [ "$(basename $x)" = "go.sum" ]; then
continue
elif [ "$(basename $x)" = "modules.txt" ]; then
continue
fi
echo "Found non-module diff: $x"
FOUND_DIFF=1
break
done

CHANGED="$(git diff-index --name-only HEAD --)"

# If we see no changes after the upgrade, then we are up to date.
if [[ "$FOUND_DIFF" -eq "0" ]]; then
if [[ "$CHANGED" == "" ]]; then
echo "VERIFY_MESSAGE=${{ github.repository }} up to date." >> $GITHUB_ENV
else
echo "VERIFY_MESSAGE=${{ github.repository }} is out of date." >> $GITHUB_ENV
echo "The following files are changed: $CHANGED"
echo 'current=false' >> $GITHUB_ENV
fi

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/knative-release-notes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15.x
go-version: 1.16.x

- name: Install Dependencies
run: GO111MODULE=on go get k8s.io/release/cmd/release-notes
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/knative-style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ jobs:
importpath: golang.org/x/tools/cmd/goimports

steps:
- name: Set up Go 1.15.x
- name: Set up Go 1.16.x
uses: actions/setup-go@v2
with:
go-version: 1.15.x
go-version: 1.16.x
id: go

- name: Check out code
Expand Down Expand Up @@ -89,10 +89,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Set up Go 1.15.x
- name: Set up Go 1.16.x
uses: actions/setup-go@v2
with:
go-version: 1.15.x
go-version: 1.16.x
id: go

- name: Check out code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/knative-verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
name: Verify Deps and Codegen
strategy:
matrix:
go-version: [1.15.x]
go-version: [1.16.x]
platform: [ubuntu-latest]

runs-on: ${{ matrix.platform }}
Expand Down