You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by ro...@apache.org on 2025/06/24 01:26:50 UTC
(apisix-ingress-controller) branch next updated: chore(ci): update workflows (#2420)
This is an automated email from the ASF dual-hosted git repository.
ronething pushed a commit to branch next
in repository https://gitbox.apache.org/repos/asf/apisix-ingress-controller.git
The following commit(s) were added to refs/heads/next by this push:
new 8bf55a0c chore(ci): update workflows (#2420)
8bf55a0c is described below
commit 8bf55a0ce4679f1c6caa1542d18f46257a8d2f6c
Author: Ashing Zheng <ax...@gmail.com>
AuthorDate: Tue Jun 24 09:26:45 2025 +0800
chore(ci): update workflows (#2420)
Signed-off-by: ashing <ax...@gmail.com>
---
.github/actions/markdown-link-check | 1 +
.github/actions/paths-filter | 1 +
.github/workflows/codeql-analysis.yml | 24 ++++++-
.github/workflows/dependency-review.yml | 37 ++++++++++
.github/workflows/lint-checker.yml | 115 ++++++++++++++++++++++++++++++
.github/workflows/push-docker-v2-dev.yaml | 44 ------------
.github/workflows/push-docker.yaml | 5 +-
.github/workflows/stale.yml | 71 ++++++++++++++++++
.github/workflows/yamllint-checker.yml | 61 ++++++++++++++++
.gitmodules | 6 ++
link-check-config.json | 32 +++++++++
11 files changed, 349 insertions(+), 48 deletions(-)
diff --git a/.github/actions/markdown-link-check b/.github/actions/markdown-link-check
new file mode 160000
index 00000000..0524e79d
--- /dev/null
+++ b/.github/actions/markdown-link-check
@@ -0,0 +1 @@
+Subproject commit 0524e79d8d7d1606112722dd7a3b5f5ce367de3e
diff --git a/.github/actions/paths-filter b/.github/actions/paths-filter
new file mode 160000
index 00000000..de90cc6f
--- /dev/null
+++ b/.github/actions/paths-filter
@@ -0,0 +1 @@
+Subproject commit de90cc6fb38fc0963ad72b210f1f284cd68cea36
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index f5bd49bd..f2e591fc 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -24,15 +24,37 @@ on:
pull_request:
branches:
- master
- - release-v2-dev
+ - next
- 1.8.0
schedule:
- cron: '25 5 * * 5'
jobs:
+ changes:
+ runs-on: ubuntu-latest
+ outputs:
+ go: ${{ steps.filter.outputs.go }}
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - uses: ./.github/actions/paths-filter
+ id: filter
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ filters: |
+ go:
+ - '*.go'
+ - '**/*.go'
analyze:
name: Analyze
runs-on: ubuntu-latest
+
+ needs: changes
+ if: |
+ (needs.changes.outputs.go == 'true')
strategy:
fail-fast: false
matrix:
diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml
new file mode 100644
index 00000000..c72a4efc
--- /dev/null
+++ b/.github/workflows/dependency-review.yml
@@ -0,0 +1,37 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+name: 'Dependency Review'
+on:
+ pull_request:
+ branches:
+ - master
+ - next
+ - 1.8.0
+
+permissions:
+ contents: read
+
+jobs:
+ dependency-review:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: 'Dependency Review'
+ uses: actions/dependency-review-action@v3
diff --git a/.github/workflows/lint-checker.yml b/.github/workflows/lint-checker.yml
new file mode 100644
index 00000000..17e0e5a0
--- /dev/null
+++ b/.github/workflows/lint-checker.yml
@@ -0,0 +1,115 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+name: lint-checker-ci
+
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ branches:
+ - master
+ - next
+ - 1.8.0
+jobs:
+ changes:
+ runs-on: ubuntu-latest
+ outputs:
+ docs: ${{ steps.filter.outputs.docs }}
+ go: ${{ steps.filter.outputs.go }}
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - uses: ./.github/actions/paths-filter
+ id: filter
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ filters: |
+ docs:
+ - 'docs/**/*'
+ - '*.md'
+ go:
+ - '*.go'
+ - '**/*.go'
+ - 'go.mod'
+ - 'go.sum'
+ - 'Makefile'
+ - 'Dockerfile'
+ - 'test/e2e/**/*'
+ - 'conf/**'
+ - 'utils/**'
+ - ".github/**"
+
+ run-test:
+ needs: changes
+ if: |
+ (needs.changes.outputs.go == 'true')
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Setup Go Env
+ uses: actions/setup-go@v4
+ with:
+ go-version: '1.22'
+ - name: run gofmt
+ working-directory: ./
+ run: |
+ diffs=`gofmt -l .`
+ if [[ -n $diffs ]]; then
+ echo "Files are not formatted by gofmt:"
+ echo $diffs
+ exit 1
+ fi
+ markdownlint:
+ needs: changes
+ if: |
+ (needs.changes.outputs.docs == 'true')
+ name: 🍇 Markdown
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: 🚀 Use Node.js
+ uses: actions/setup-node@v3
+ with:
+ node-version: '20.7.x'
+ - run: npm install -g markdownlint-cli@0.36.0
+ - run: markdownlint '**/*.md' --ignore node_modules --ignore CHANGELOG.md --ignore docs/en/latest/references/v2.md
+ markdown-link-check:
+ needs: changes
+ if: |
+ (needs.changes.outputs.docs == 'true')
+ runs-on: ubuntu-latest
+ name: Check Markdown links
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+ - uses: ./.github/actions/markdown-link-check
+ with:
+ use-quiet-mode: 'yes'
+ use-verbose-mode: 'yes'
+ config-file: 'link-check-config.json'
+ folder-path: 'docs/en'
+ file-path: './README.md, ./install.md, ./test/e2e/README.md'
+ max-depth: -1
+ file-extension: ".md"
+ check-modified-files-only: "no"
diff --git a/.github/workflows/push-docker-v2-dev.yaml b/.github/workflows/push-docker-v2-dev.yaml
deleted file mode 100644
index e4ca8d2d..00000000
--- a/.github/workflows/push-docker-v2-dev.yaml
+++ /dev/null
@@ -1,44 +0,0 @@
-name: push v2-dev on dockerhub
-on:
- release:
- types: [ published ]
- push:
- branches:
- - release-v2-dev
- workflow_dispatch:
-jobs:
- docker:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- with:
- submodules: recursive
-
- - name: Setup Go Env
- uses: actions/setup-go@v4
- with:
- go-version: "1.22"
-
-# - name: Set up QEMU
-# uses: docker/setup-qemu-action@v3
-#
-# - name: Set up Docker Buildx
-# uses: docker/setup-buildx-action@v3
-
- - name: Login to Registry
- uses: docker/login-action@v3
- with:
- registry: ${{ secrets.DOCKER_REGISTRY }}
- username: ${{ secrets.DOCKER_USERNAME }}
- password: ${{ secrets.DOCKER_PASSWORD }}
-
- - name: Build push image
- env:
- TAG: dev
- ARCH: amd64
- ENABLE_PROXY: "false"
- BASE_IMAGE_TAG: "debug"
- run: |
- echo "building images..."
- make build-push-image
diff --git a/.github/workflows/push-docker.yaml b/.github/workflows/push-docker.yaml
index 3103c70e..99612ea1 100644
--- a/.github/workflows/push-docker.yaml
+++ b/.github/workflows/push-docker.yaml
@@ -27,9 +27,8 @@ jobs:
- name: Login to Registry
uses: docker/login-action@v3
with:
- registry: ${{ secrets.DOCKER_REGISTRY }}
- username: ${{ secrets.DOCKER_USERNAME }}
- password: ${{ secrets.DOCKER_PASSWORD }}
+ username: ${{ secrets.DOCKERHUB_USER }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push multi-arch image
env:
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
new file mode 100644
index 00000000..3ed85e9d
--- /dev/null
+++ b/.github/workflows/stale.yml
@@ -0,0 +1,71 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+name: 'Close stale issues and PRs'
+
+on:
+ workflow_dispatch:
+ schedule:
+ - cron: '0 1 * * *'
+
+permissions:
+ contents: read
+
+jobs:
+ stale:
+ permissions:
+ issues: write # for actions/stale to close stale issues
+ pull-requests: write # for actions/stale to close stale PRs
+ name: Prune Stale
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+
+ steps:
+ - uses: actions/stale@v5
+ with:
+ days-before-issue-stale: 90
+ days-before-issue-close: 30
+ stale-issue-message: >
+ This issue has been marked as stale due to 90 days of inactivity.
+ It will be closed in 30 days if no further activity occurs. If this issue is still
+ relevant, please simply write any comment. Even if closed, you can still revive the
+ issue at any time or discuss it on the dev@apisix.apache.org list.
+ Thank you for your contributions.
+ close-issue-message: >
+ This issue has been closed due to lack of activity. If you think that
+ is incorrect, or the issue requires additional review, you can revive the issue at
+ any time.
+ days-before-pr-stale: 60
+ days-before-pr-close: 30
+ stale-pr-message: >
+ This pull request has been marked as stale due to 60 days of inactivity.
+ It will be closed in 30 days if no further activity occurs. If you think
+ that's incorrect or this pull request should instead be reviewed, please simply
+ write any comment. Even if closed, you can still revive the PR at any time or
+ discuss it on the dev@apisix.apache.org list.
+ Thank you for your contributions.
+ close-pr-message: >
+ This pull request/issue has been closed due to lack of activity. If you think that
+ is incorrect, or the pull request requires review, you can revive the PR at any time.
+ # Issues with these labels will never be considered stale.
+ exempt-issue-labels: 'triage/accepted,discuss,good first issue'
+ exempt-pr-labels: 'triage/accepted'
+ exempt-all-milestones: true
+ stale-issue-label: 'stale'
+ stale-pr-label: 'stale'
+ ascending: true
diff --git a/.github/workflows/yamllint-checker.yml b/.github/workflows/yamllint-checker.yml
new file mode 100644
index 00000000..e14c33c5
--- /dev/null
+++ b/.github/workflows/yamllint-checker.yml
@@ -0,0 +1,61 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+name: yamllint-checker
+
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ branches:
+ - master
+ - next
+ - 1.8.0
+jobs:
+ changes:
+ runs-on: ubuntu-latest
+ outputs:
+ yaml: ${{ steps.filter.outputs.yaml }}
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - uses: ./.github/actions/paths-filter
+ id: filter
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ # focus on `samples/deploy` yaml files directory
+ filters: |
+ yaml:
+ - 'samples/deploy/**/*'
+ yamllint-checker:
+ needs: changes
+ if: |
+ (needs.changes.outputs.yaml == 'true')
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v4
+ with:
+ python-version: '3.10'
+ - run: pip install yamllint==1.29.0
+ - name: 🚀 Run yamllint
+ run: yamllint samples/deploy # focus on `samples/deploy` yaml files directory
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 00000000..1510d103
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,6 @@
+[submodule ".github/actions/paths-filter"]
+ path = .github/actions/paths-filter
+ url = https://github.com/dorny/paths-filter.git
+[submodule ".github/actions/markdown-link-check"]
+ path = .github/actions/markdown-link-check
+ url = https://github.com/gaurav-nelson/github-action-markdown-link-check.git
diff --git a/link-check-config.json b/link-check-config.json
new file mode 100644
index 00000000..12cb61b9
--- /dev/null
+++ b/link-check-config.json
@@ -0,0 +1,32 @@
+{
+ "ignorePatterns": [
+ {
+ "pattern": "^https://github.com/.*?/issue"
+ },
+ {
+ "pattern": "^https://github.com/.*?/pull"
+ },
+ {
+ "pattern": "^#"
+ }
+ ],
+ "replacementPatterns": [
+ {
+ "pattern": "^https://github.com/apache/apisix-ingress-controller/blob/master/",
+ "replacement": "{{BASEURL}}/"
+ },
+ {
+ "pattern": "^https://github.com/apache/apisix-ingress-controller/tree/master/",
+ "replacement": "{{BASEURL}}/"
+ },
+ {
+ "pattern": "^https://apisix.apache.org/docs/ingress-controller/(.*?)$",
+ "replacement": "{{BASEURL}}/docs/en/latest/$1.md"
+ }
+ ],
+ "timeout": "20s",
+ "retryOn429": true,
+ "retryCount": 5,
+ "fallbackRetryDelay": "30s",
+ "aliveStatusCodes": [200, 206]
+}