From d77af2ca410c6e69f07c8c0c7d8cd408ef4da939 Mon Sep 17 00:00:00 2001 From: Knative Automation Date: Fri, 14 May 2021 15:09:51 +0000 Subject: [PATCH] Update actions Signed-off-by: Knative Automation --- .github/workflows/knative-boilerplate.yaml | 4 +-- .github/workflows/knative-go-build.yaml | 11 ++++++--- .github/workflows/knative-go-test.yaml | 2 +- .github/workflows/knative-releasability.yaml | 26 ++++++-------------- .github/workflows/knative-release-notes.yaml | 2 +- .github/workflows/knative-style.yaml | 8 +++--- .github/workflows/knative-verify.yaml | 2 +- 7 files changed, 25 insertions(+), 30 deletions(-) diff --git a/.github/workflows/knative-boilerplate.yaml b/.github/workflows/knative-boilerplate.yaml index c0e648b1c..9d4093ea6 100644 --- a/.github/workflows/knative-boilerplate.yaml +++ b/.github/workflows/knative-boilerplate.yaml @@ -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 diff --git a/.github/workflows/knative-go-build.yaml b/.github/workflows/knative-go-build.yaml index 7bd13004a..da2ffd01a 100644 --- a/.github/workflows/knative-go-build.yaml +++ b/.github/workflows/knative-go-build.yaml @@ -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 }} @@ -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/' | \ @@ -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 ./... diff --git a/.github/workflows/knative-go-test.yaml b/.github/workflows/knative-go-test.yaml index 965df1e74..79432a7a3 100644 --- a/.github/workflows/knative-go-test.yaml +++ b/.github/workflows/knative-go-test.yaml @@ -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 }} diff --git a/.github/workflows/knative-releasability.yaml b/.github/workflows/knative-releasability.yaml index 5a30c913f..5e064c4c4 100644 --- a/.github/workflows/knative-releasability.yaml +++ b/.github/workflows/knative-releasability.yaml @@ -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: @@ -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 @@ -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 diff --git a/.github/workflows/knative-release-notes.yaml b/.github/workflows/knative-release-notes.yaml index 517f429bc..172eb390c 100644 --- a/.github/workflows/knative-release-notes.yaml +++ b/.github/workflows/knative-release-notes.yaml @@ -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 diff --git a/.github/workflows/knative-style.yaml b/.github/workflows/knative-style.yaml index c5770a4b0..754b91736 100644 --- a/.github/workflows/knative-style.yaml +++ b/.github/workflows/knative-style.yaml @@ -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 @@ -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 diff --git a/.github/workflows/knative-verify.yaml b/.github/workflows/knative-verify.yaml index 5f20c548b..e18937e17 100644 --- a/.github/workflows/knative-verify.yaml +++ b/.github/workflows/knative-verify.yaml @@ -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 }}