mirror of https://github.com/knative/docs.git
Update actions (#4370)
Signed-off-by: Knative Automation <automation@knative.team>
This commit is contained in:
parent
c48433293d
commit
bd52ff5185
|
@ -42,10 +42,10 @@ jobs:
|
|||
|
||||
steps:
|
||||
|
||||
- name: Set up Go 1.16.x
|
||||
- name: Set up Go 1.17.x
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16.x
|
||||
go-version: 1.17.x
|
||||
id: go
|
||||
|
||||
- name: Check out code
|
||||
|
|
|
@ -27,7 +27,7 @@ jobs:
|
|||
name: Build
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.16.x]
|
||||
go-version: [1.17.x]
|
||||
platform: [ubuntu-latest]
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
|
@ -56,6 +56,7 @@ jobs:
|
|||
grep -v '^./hack/' | \
|
||||
grep -v '^./third_party' | \
|
||||
cut -f3 -d' ' | \
|
||||
tr ',' '\n' | \
|
||||
sort | uniq | \
|
||||
grep -v '^!' | \
|
||||
tr '\n' ' ')"
|
||||
|
|
|
@ -31,7 +31,7 @@ jobs:
|
|||
name: Unit Tests
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.16.x]
|
||||
go-version: [1.17.x]
|
||||
platform: [ubuntu-latest]
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
|
@ -52,6 +52,12 @@ jobs:
|
|||
- name: Merge upstream
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
if ! git config user.name > /dev/null; then
|
||||
git config user.name "John Doe"
|
||||
fi
|
||||
if ! git config user.email > /dev/null; then
|
||||
git config user.email "johndoe@localhost"
|
||||
fi
|
||||
git remote add upstream https://github.com/${{ github.repository }}.git
|
||||
git fetch upstream ${{ github.base_ref }}
|
||||
git pull --no-rebase --no-commit upstream ${{ github.base_ref }}
|
||||
|
|
|
@ -25,6 +25,8 @@ on:
|
|||
inputs:
|
||||
releaseFamily:
|
||||
description: 'Release? (vX.Y)'
|
||||
moduleReleaseFamily:
|
||||
description: 'Module Release? (vX.Y)'
|
||||
slackChannel:
|
||||
description: 'Slack Channel? (release-#)'
|
||||
|
||||
|
@ -36,17 +38,21 @@ jobs:
|
|||
env:
|
||||
#########################################
|
||||
# Update this section each release. #
|
||||
RELEASE: 'v0.26'
|
||||
SLACK_CHANNEL: 'release-26'
|
||||
RELEASE: 'v1.0'
|
||||
MODULE_RELEASE: 'v0.27'
|
||||
SLACK_CHANNEL: 'release-1dot0'
|
||||
#########################################
|
||||
|
||||
steps:
|
||||
- name: Defaults
|
||||
run: |
|
||||
# If manual trigger sent releaseFamily and slackChannel, then override them
|
||||
# If manual trigger sent releaseFamily, moduleReleaseFamily and slackChannel, then override them
|
||||
if [[ "${{ github.event.inputs.releaseFamily }}" != "" ]]; then
|
||||
echo "RELEASE=${{ github.event.inputs.releaseFamily }}" >> $GITHUB_ENV
|
||||
fi
|
||||
if [[ "${{ github.event.inputs.moduleReleaseFamily }}" != "" ]]; then
|
||||
echo "MODULE_RELEASE=${{ github.event.inputs.moduleReleaseFamily }}" >> $GITHUB_ENV
|
||||
fi
|
||||
if [[ "${{ github.event.inputs.slackChannel }}" != "" ]]; then
|
||||
echo "SLACK_CHANNEL=${{ github.event.inputs.slackChannel }}" >> $GITHUB_ENV
|
||||
fi
|
||||
|
@ -54,10 +60,10 @@ jobs:
|
|||
echo "SLACK_WEBHOOK=exists" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Set up Go 1.16.x
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16.x
|
||||
go-version: 1.17.x
|
||||
|
||||
- name: Install Dependencies
|
||||
run: GO111MODULE=on go get knative.dev/test-infra/buoy@main
|
||||
|
@ -69,7 +75,7 @@ jobs:
|
|||
id: exists
|
||||
run: |
|
||||
EXISTS=0
|
||||
buoy exists go.mod --release ${RELEASE} --verbose || EXISTS=$?
|
||||
buoy exists go.mod --release ${RELEASE} --module-release ${MODULE_RELEASE} --verbose || EXISTS=$?
|
||||
if [[ "$EXISTS" -eq "0" ]]; then
|
||||
EXISTS=true
|
||||
else
|
||||
|
@ -83,7 +89,7 @@ jobs:
|
|||
# The following pushes the stdout of buoy into $CHECK_MESSAGE
|
||||
CHECK=0
|
||||
echo 'CHECK_MESSAGE<<EOF' >> $GITHUB_ENV
|
||||
buoy check go.mod --release ${RELEASE} --domain knative.dev --verbose >> $GITHUB_ENV 2>&1 || CHECK=$?
|
||||
buoy check go.mod --release ${RELEASE} --module-release ${MODULE_RELEASE} --domain knative.dev --verbose >> $GITHUB_ENV 2>&1 || CHECK=$?
|
||||
echo 'EOF' >> $GITHUB_ENV
|
||||
|
||||
# We just captured the return code of the buoy call, test it to see
|
||||
|
@ -99,7 +105,7 @@ jobs:
|
|||
if: steps.exists.outputs.release-branch == 'false' && env.current == 'true'
|
||||
run: |
|
||||
# if update deps returns un-successful, then mark current to false.
|
||||
if ! ./hack/update-deps.sh --release ${RELEASE} --upgrade; then
|
||||
if ! ./hack/update-deps.sh --release ${MODULE_RELEASE} --upgrade; then
|
||||
echo "VERIFY_MESSAGE=Unable to update deps for ${{ github.repository }}." >> $GITHUB_ENV
|
||||
echo 'current=false' >> $GITHUB_ENV
|
||||
fi
|
||||
|
|
|
@ -41,7 +41,7 @@ jobs:
|
|||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16.x
|
||||
go-version: 1.17.x
|
||||
|
||||
- name: Install Dependencies
|
||||
run: GO111MODULE=on go get k8s.io/release/cmd/release-notes
|
||||
|
|
|
@ -40,10 +40,10 @@ jobs:
|
|||
importpath: golang.org/x/tools/cmd/goimports
|
||||
|
||||
steps:
|
||||
- name: Set up Go 1.16.x
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16.x
|
||||
go-version: 1.17.x
|
||||
id: go
|
||||
|
||||
- name: Check out code
|
||||
|
@ -89,10 +89,10 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Set up Go 1.16.x
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16.x
|
||||
go-version: 1.17.x
|
||||
id: go
|
||||
|
||||
- name: Check out code
|
||||
|
@ -146,6 +146,7 @@ jobs:
|
|||
git ls-files |
|
||||
git check-attr --stdin linguist-generated | grep -Ev ': (set|true)$' | cut -d: -f1 |
|
||||
git check-attr --stdin linguist-vendored | grep -Ev ': (set|true)$' | cut -d: -f1 |
|
||||
git check-attr --stdin ignore-lint | grep -Ev ': (set|true)$' | cut -d: -f1 |
|
||||
grep -Ev '^(vendor/|third_party/|.git)' |
|
||||
xargs misspell -i importas -error |
|
||||
reviewdog -efm="%f:%l:%c: %m" \
|
||||
|
@ -175,6 +176,7 @@ jobs:
|
|||
git ls-files |
|
||||
git check-attr --stdin linguist-generated | grep -Ev ': (set|true)$' | cut -d: -f1 |
|
||||
git check-attr --stdin linguist-vendored | grep -Ev ': (set|true)$' | cut -d: -f1 |
|
||||
git check-attr --stdin ignore-lint | grep -Ev ': (set|true)$' | cut -d: -f1 |
|
||||
grep -Ev '^(vendor/|third_party/|.git)' |
|
||||
xargs grep -nE " +$" |
|
||||
reviewdog -efm="%f:%l:%m" \
|
||||
|
@ -206,6 +208,7 @@ jobs:
|
|||
LINT_FILES=$(git ls-files |
|
||||
git check-attr --stdin linguist-generated | grep -Ev ': (set|true)$' | cut -d: -f1 |
|
||||
git check-attr --stdin linguist-vendored | grep -Ev ': (set|true)$' | cut -d: -f1 |
|
||||
git check-attr --stdin ignore-lint | grep -Ev ': (set|true)$' | cut -d: -f1 |
|
||||
grep -Ev '^(vendor/|third_party/|.git)' |
|
||||
grep -v '\.ai$')
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ jobs:
|
|||
name: Verify Deps and Codegen
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.16.x]
|
||||
go-version: [1.17.x]
|
||||
platform: [ubuntu-latest]
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
|
|
Loading…
Reference in New Issue