Skip to content

[Docs] Expand Concepts page with additional PipeCD terminology #9575

[Docs] Expand Concepts page with additional PipeCD terminology

[Docs] Expand Concepts page with additional PipeCD terminology #9575

Workflow file for this run

name: lint
on:
push:
branches:
- master
pull_request:
branches:
- master
- "release-v*"
- "feat/*"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
GO_VERSION: 1.26.2
NODE_VERSION: 20.19.0
GOLANGCI_LINT_VERSION: v2.11.4
HELM_VERSION: 3.17.3
jobs:
list-go-modules:
runs-on: ubuntu-24.04
outputs:
modules: ${{ steps.list-go-modules.outputs.modules }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: List go modules
id: list-go-modules
run: |
echo "modules=$(find . -name go.mod -exec dirname {} \; | sort | jq -R -s -c 'split("\n") | map(select(length > 0))')" >> $GITHUB_OUTPUT
go:
runs-on: ubuntu-24.04
needs: list-go-modules
strategy:
fail-fast: false
matrix:
module: ${{ fromJSON(needs.list-go-modules.outputs.modules) }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: golangci-lint
uses: reviewdog/action-golangci-lint@f9bba13753278f6a73b27a56a3ffb1bfda90ed71 #v2.8.0
with:
workdir: ${{ matrix.module }}
go_version: ${{ env.GO_VERSION }}
golangci_lint_version: ${{ env.GOLANGCI_LINT_VERSION }}
golangci_lint_flags: --config ${{ github.workspace }}/.golangci.yml
fail_level: error
filter_mode: nofilter
# This job is used to check if the go linting is completed successfully
# It is used to set as required check for the branch protection rules
go-lint-completed:
runs-on: ubuntu-24.04
if: always()
needs: go
steps:
- name: Check if all go lint jobs succeeded
# if jobs in the 'go' job matrix failed or were cancelled, this job will fail
# otherwise this job is marked as successful because all steps are skipped
run: exit 1
if: needs.go.result != 'success'
web:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Update web dependencies
run: make update/web-deps
- name: Run lint
run: make lint/web
helm:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Helm
uses: azure/setup-helm@v4
with:
version: ${{ env.HELM_VERSION }}
- name: Lint all Helm charts
run: make lint/helm
govulncheck:
runs-on: ubuntu-24.04
needs: list-go-modules
strategy:
fail-fast: false
matrix:
module: ${{ fromJSON(needs.list-go-modules.outputs.modules) }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
- name: Run govulncheck
working-directory: ${{ matrix.module }}
# TODO: Remove continue-on-error once vulnerabilities are fixed (see #6600)
continue-on-error: true
run: govulncheck ./...
govulncheck-completed:
runs-on: ubuntu-24.04
if: always()
needs: govulncheck
steps:
- name: Check govulncheck status
# Warn-only for now until vulnerabilities are fixed (see #6600)
# Change 'skipped' back to 'success' once fixed
run: |
echo "::warning::govulncheck found vulnerabilities - see issue #6600 for tracking"
if: needs.govulncheck.result != 'success'