mirror of https://github.com/knative/docs.git
Update actions (#4466)
Signed-off-by: Knative Automation <automation@knative.team>
This commit is contained in:
parent
3efdd2dce3
commit
8b3619dde7
|
|
@ -61,7 +61,7 @@ jobs:
|
||||||
echo '::endgroup::'
|
echo '::endgroup::'
|
||||||
|
|
||||||
echo '::group:: Installing boilerplate-check ... https://github.com/mattmoor/boilerplate-check'
|
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 '::endgroup::'
|
||||||
|
|
||||||
echo "${TEMP_PATH}" >> $GITHUB_PATH
|
echo "${TEMP_PATH}" >> $GITHUB_PATH
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ jobs:
|
||||||
go-version: 1.17.x
|
go-version: 1.17.x
|
||||||
|
|
||||||
- name: Install Dependencies
|
- 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
|
- name: Check out code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ jobs:
|
||||||
go-version: 1.17.x
|
go-version: 1.17.x
|
||||||
|
|
||||||
- name: Install Dependencies
|
- 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
|
- name: Check out code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ jobs:
|
||||||
- tool: gofmt
|
- tool: gofmt
|
||||||
options: -s
|
options: -s
|
||||||
- tool: goimports
|
- tool: goimports
|
||||||
importpath: golang.org/x/tools/cmd/goimports
|
package: golang.org/x/tools/cmd/goimports@latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
|
|
@ -50,10 +50,10 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
if: ${{ matrix.importpath != '' }}
|
if: ${{ matrix.package != '' }}
|
||||||
run: |
|
run: |
|
||||||
cd $(mktemp -d)
|
cd $(mktemp -d)
|
||||||
GO111MODULE=on go get ${{ matrix.importpath }}
|
go install ${{ matrix.package }}
|
||||||
|
|
||||||
- name: ${{ matrix.tool }} ${{ matrix.options }}
|
- name: ${{ matrix.tool }} ${{ matrix.options }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
@ -106,7 +106,7 @@ jobs:
|
||||||
if: steps.golangci_configuration.outputs.files_exists == 'true'
|
if: steps.golangci_configuration.outputs.files_exists == 'true'
|
||||||
uses: golangci/golangci-lint-action@v2
|
uses: golangci/golangci-lint-action@v2
|
||||||
with:
|
with:
|
||||||
version: v1.42
|
version: v1.43
|
||||||
|
|
||||||
- name: Install Tools
|
- name: Install Tools
|
||||||
env:
|
env:
|
||||||
|
|
|
||||||
|
|
@ -32,11 +32,7 @@ jobs:
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
|
|
||||||
env:
|
|
||||||
GOPATH: ${{ github.workspace }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Set up Go ${{ matrix.go-version }}
|
- name: Set up Go ${{ matrix.go-version }}
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
|
|
@ -45,22 +41,16 @@ jobs:
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: |
|
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
|
go install github.com/google/ko@latest
|
||||||
chmod +x ./ko
|
go install github.com/google/go-licenses@latest
|
||||||
sudo mv ko /usr/local/bin
|
|
||||||
go get github.com/google/go-licenses
|
|
||||||
|
|
||||||
- name: Check out code onto GOPATH
|
- name: Check out code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
|
||||||
path: ./src/knative.dev/${{ github.event.repository.name }}
|
|
||||||
|
|
||||||
- name: Update Codegen
|
- name: Update Codegen
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
pushd ./src/knative.dev/${{ github.event.repository.name }}
|
|
||||||
[[ ! -f hack/update-codegen.sh ]] || ./hack/update-codegen.sh
|
[[ ! -f hack/update-codegen.sh ]] || ./hack/update-codegen.sh
|
||||||
popd
|
|
||||||
|
|
||||||
- name: Verify
|
- name: Verify
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
@ -72,7 +62,6 @@ jobs:
|
||||||
sed ':begin;$!N;s/\n/%0A/;tbegin'
|
sed ':begin;$!N;s/\n/%0A/;tbegin'
|
||||||
}
|
}
|
||||||
|
|
||||||
pushd ./src/knative.dev/${{ github.event.repository.name }}
|
|
||||||
if [[ -z "$(git status --porcelain)" ]]; then
|
if [[ -z "$(git status --porcelain)" ]]; then
|
||||||
echo "${{ github.repository }} up to date."
|
echo "${{ github.repository }} up to date."
|
||||||
else
|
else
|
||||||
|
|
@ -85,4 +74,3 @@ jobs:
|
||||||
echo "${{ github.repository }} is out of date. Please run hack/update-codegen.sh"
|
echo "${{ github.repository }} is out of date. Please run hack/update-codegen.sh"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
popd
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue