feat: update workflows

This commit is contained in:
auricom
2022-07-15 12:07:22 +02:00
parent fca9203e2b
commit 5622f6e167
6 changed files with 111 additions and 17 deletions

3
.github/linters/.jscpd.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"ignore": ["**/truenas/files/scripts/**"]
}

View File

@@ -68,7 +68,7 @@ jobs:
with:
issue-number: "${{ github.event.pull_request.number }}"
comment-author: "${{ env.BOT_USERNAME }}"
body-includes: helm-release.yaml
body-includes: "${{ matrix.file }}"
- name: Create or update comment
uses: peter-evans/create-or-update-comment@v2
with:

View File

@@ -13,21 +13,23 @@ concurrency:
jobs:
build:
name: Lint
name: MegaLinter
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Generate Token
uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: "${{ secrets.BOT_APP_ID }}"
private_key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
- name: MegaLinter
uses: oxsecurity/megalinter@v6.0.3
uses: oxsecurity/megalinter@v6.0.4
env:
GITHUB_TOKEN: "${{ steps.generate-token.outputs.token }}"
PRINT_ALPACA: false
@@ -40,10 +42,10 @@ jobs:
"ACTION_ACTIONLINT",
"ANSIBLE_ANSIBLE_LINT",
"COPYPASTE_JSCPD",
"CREDENTIALS_SECRETLINT",
"GIT_GIT_DIFF",
"KUBERNETES_KUBEVAL",
"MARKDOWN_MARKDOWNLINT",
"REPOSITORY_GIT_DIFF",
"REPOSITORY_SECRETLINT",
"TERRAFORM_TERRAFORM_FMT",
"YAML_PRETTIER",
"YAML_YAMLLINT"
@@ -53,19 +55,13 @@ jobs:
)
}}
ANSIBLE_DIRECTORY: ansible
ANSIBLE_ANSIBLE_LINT_CONFIG_FILE: .ansible-lint
ANSIBLE_ANSIBLE_LINT_CONFIG_FILE: .github/linters/.ansible-lint
COPYPASTE_JSCPD_CONFIG_FILE: .github/linters/.jspcd.json
KUBERNETES_DIRECTORY: cluster
KUBERNETES_KUBEVAL_ARGUMENTS: --ignore-missing-schemas
KUBERNETES_KUBEVAL_FILTER_REGEX_INCLUDE: "(kubernetes)"
MARKDOWN_MARKDOWNLINT_CONFIG_FILE: .github/linters/.markdownlint.yaml
MARKDOWN_MARKDOWNLINT_RULES_PATH: .github/
YAML_YAMLLINT_CONFIG_FILE: .github/linters/.yamllint.yaml
YAML_PRETTIER_CONFIG_FILE: .github/linters/.prettierrc.yaml
YAML_PRETTIER_FILTER_REGEX_EXCLUDE: "(.*\\.sops\\.ya?ml)"
- name: Archive production artifacts
if: ${{ success() }} || ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: MegaLinter reports
path: |
report
mega-linter.log

View File

@@ -64,8 +64,7 @@ jobs:
image-ref: ${{ matrix.containers }}
vuln-type: os,library
severity: CRITICAL,HIGH
format: template
template: "@/contrib/sarif.tpl"
format: sarif
output: trivy-results.sarif
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2

View File

@@ -44,7 +44,7 @@ jobs:
echo "DRY_RUN=${{ github.event.inputs.dryRun || env.DRY_RUN }}" >> "${GITHUB_ENV}"
echo "LOG_LEVEL=${{ github.event.inputs.logLevel || env.LOG_LEVEL }}" >> "${GITHUB_ENV}"
- name: Renovate
uses: renovatebot/github-action@v32.112.0
uses: renovatebot/github-action@v32.111.0
with:
configurationFile: .github/renovate.json5
token: "x-access-token:${{ steps.generate-token.outputs.token }}"