-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(ci/KAG-1800): add lint and sast workflows using shared actions * chore(ci): pin shared code quality actions * chore(*): backport - localize some functions A commit on master 80ee2e1 introduced localizing some functions. This commit backports that one. Backports: #92 * fix(healthcheck): fixed incorrect default http_statuses when new() was called multiple times (#83) * chore(lint): bump kong/public-shared-actions * docs(README): added 1.5.2 and 1.5.3 releases * chore(*) rename readme, add release instructions * chore(healthcheck): fix get_defaults function * fix(test): fix worker-events test * release 3.0.0 * chore(github): cancel in progress workflows when new pushed --------- Co-authored-by: saisatish karra <saisatish.karra@konghq.com> Co-authored-by: Shuoqing Ding <dsq704136@gmail.com> Co-authored-by: Vinicius Mignot <vinicius.mignot@gmail.com> Co-authored-by: Thijs Schreijer <thijs@thijsschreijer.nl>
- Loading branch information
1 parent
d5754c2
commit a2bec67
Showing
9 changed files
with
287 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Lint | ||
|
||
concurrency: | ||
# for PR's cancel the running task, if another commit is pushed | ||
group: ${{ github.workflow }} ${{ github.ref }} | ||
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
||
on: | ||
pull_request: {} | ||
workflow_dispatch: {} | ||
push: | ||
branches: | ||
- main | ||
- master | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
||
jobs: | ||
lua-check: | ||
name: Lua Check | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
issues: read | ||
checks: write | ||
pull-requests: write | ||
if: (github.actor != 'dependabot[bot]') | ||
|
||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
|
||
# Optional step to run on only changed files | ||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@54849deb963ca9f24185fb5de2965e002d066e6b # v37 | ||
with: | ||
files: | | ||
**.lua | ||
- name: Lua Check | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
uses: Kong/public-shared-actions/code-check-actions/lua-lint@c03e30a36e8a2dde5cbd463229a96aaad7ccad24 | ||
with: | ||
additional_args: '--no-default-config --config .luacheckrc' | ||
files: ${{ steps.changed-files.outputs.all_changed_files }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: SAST | ||
|
||
concurrency: | ||
# for PR's cancel the running task, if another commit is pushed | ||
group: ${{ github.workflow }} ${{ github.ref }} | ||
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- lib/**.lua | ||
push: | ||
branches: | ||
- master | ||
- main | ||
paths: | ||
- lib/**.lua | ||
workflow_dispatch: {} | ||
|
||
|
||
jobs: | ||
semgrep: | ||
name: Semgrep SAST | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# required for all workflows | ||
security-events: write | ||
# only required for workflows in private repositories | ||
actions: read | ||
contents: read | ||
|
||
if: (github.actor != 'dependabot[bot]') | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: Kong/public-shared-actions/security-actions/semgrep@c03e30a36e8a2dde5cbd463229a96aaad7ccad24 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package = "lua-resty-healthcheck" | ||
version = "3.0.0-1" | ||
source = { | ||
url = "git+https://github.com/Kong/lua-resty-healthcheck.git", | ||
tag = "3.0.0" | ||
} | ||
description = { | ||
summary = "Healthchecks for OpenResty to check upstream service status", | ||
detailed = [[ | ||
lua-resty-healthcheck is a module that can check upstream service | ||
availability by sending requests and validating responses at timed | ||
intervals. | ||
]], | ||
license = "Apache 2.0", | ||
homepage = "https://github.com/Kong/lua-resty-healthcheck" | ||
} | ||
dependencies = { | ||
"penlight >= 1.9.2", | ||
"lua-resty-timer ~> 1", | ||
} | ||
build = { | ||
type = "builtin", | ||
modules = { | ||
["resty.healthcheck"] = "lib/resty/healthcheck.lua", | ||
} | ||
} |
Oops, something went wrong.