Skip to content

Commit

Permalink
Update actions (#337)
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 Nov 11, 2021
1 parent 8710f24 commit ce2715a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/knative-boilerplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
echo '::endgroup::'
echo '::group:: Installing boilerplate-check ... https://github.com/mattmoor/boilerplate-check'
go get github.com/mattmoor/boilerplate-check/cmd/boilerplate-check
go install github.com/mattmoor/boilerplate-check/cmd/boilerplate-check@latest
echo '::endgroup::'
echo "${TEMP_PATH}" >> $GITHUB_PATH
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/knative-releasability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
go-version: 1.17.x

- name: Install Dependencies
run: GO111MODULE=on go get knative.dev/test-infra/buoy@main
run: go install knative.dev/test-infra/buoy@main

- name: Check out code
uses: actions/checkout@v2
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 @@ -44,7 +44,7 @@ jobs:
go-version: 1.17.x

- name: Install Dependencies
run: GO111MODULE=on go get k8s.io/release/cmd/release-notes
run: go install k8s.io/release/cmd/release-notes@latest

- name: Check out code
uses: actions/checkout@v2
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 @@ -37,7 +37,7 @@ jobs:
- tool: gofmt
options: -s
- tool: goimports
importpath: golang.org/x/tools/cmd/goimports
package: golang.org/x/tools/cmd/goimports@latest

steps:
- name: Set up Go
Expand All @@ -50,10 +50,10 @@ jobs:
uses: actions/checkout@v2

- name: Install Dependencies
if: ${{ matrix.importpath != '' }}
if: ${{ matrix.package != '' }}
run: |
cd $(mktemp -d)
GO111MODULE=on go get ${{ matrix.importpath }}
go install ${{ matrix.package }}
- name: ${{ matrix.tool }} ${{ matrix.options }}
shell: bash
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
if: steps.golangci_configuration.outputs.files_exists == 'true'
uses: golangci/golangci-lint-action@v2
with:
version: v1.42
version: v1.43

- name: Install Tools
env:
Expand Down
18 changes: 3 additions & 15 deletions .github/workflows/knative-verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ jobs:

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

env:
GOPATH: ${{ github.workspace }}

steps:

- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v2
with:
Expand All @@ -45,22 +41,16 @@ jobs:

- name: Install Dependencies
run: |
curl -L https://github.com/google/ko/releases/download/v0.6.0/ko_0.6.0_Linux_x86_64.tar.gz | tar xzf - ko
chmod +x ./ko
sudo mv ko /usr/local/bin
go get github.com/google/go-licenses
go install github.com/google/ko@latest
go install github.com/google/go-licenses@latest
- name: Check out code onto GOPATH
- name: Check out code
uses: actions/checkout@v2
with:
path: ./src/knative.dev/${{ github.event.repository.name }}

- name: Update Codegen
shell: bash
run: |
pushd ./src/knative.dev/${{ github.event.repository.name }}
[[ ! -f hack/update-codegen.sh ]] || ./hack/update-codegen.sh
popd
- name: Verify
shell: bash
Expand All @@ -72,7 +62,6 @@ jobs:
sed ':begin;$!N;s/\n/%0A/;tbegin'
}
pushd ./src/knative.dev/${{ github.event.repository.name }}
if [[ -z "$(git status --porcelain)" ]]; then
echo "${{ github.repository }} up to date."
else
Expand All @@ -85,4 +74,3 @@ jobs:
echo "${{ github.repository }} is out of date. Please run hack/update-codegen.sh"
exit 1
fi
popd

0 comments on commit ce2715a

Please sign in to comment.