Skip to content

Commit

Permalink
Update actions
Browse files Browse the repository at this point in the history
Signed-off-by: Knative Automation <automation@knative.team>
  • Loading branch information
knative-automation committed May 14, 2021
1 parent 5fd07fc commit d77af2c
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 30 deletions.
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

0 comments on commit d77af2c

Please sign in to comment.