🌱 Update github-actions group #1450
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
name: "Lint Pull Request" | |
on: # yamllint disable-line rule:truthy | |
workflow_dispatch: | |
pull_request_target: | |
types: [opened, edited, synchronize, reopened, ready_for_review] | |
paths: | |
- "**.go" | |
- "**go.mod" | |
- "**go.sum" | |
- "<templates|test>/**/*.<yml|yaml>" | |
- ".github/actions/**/*" | |
- ".github/workflows/e2e-*" | |
- ".github/workflows/pr-*" | |
- ".golangci.yaml" | |
- "images/caph/**" | |
- "!**/vendor/**" | |
- "test/e2e/**" | |
- "docs/**" | |
# yamllint disable rule:line-length | |
jobs: | |
pr-lint: | |
name: "Lint Pull Request" | |
if: github.event_name != 'pull_request_target' || !github.event.pull_request.draft | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/syself/caph-builder:1.0.18 | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ secrets.github_token }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Fixup git permissions | |
# https://github.com/actions/checkout/issues/766 | |
shell: bash | |
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- name: Verify Golang Modules | |
run: make BUILD_IN_CONTAINER=false generate-modules-ci | |
# to ensure we don't miss any files that were supposed to be autogenerated. | |
# if there's a diff then the workflow will exit here. | |
- name: Run make verify | |
run: make BUILD_IN_CONTAINER=false verify | |
- name: Lint Golang Code | |
run: make BUILD_IN_CONTAINER=false lint-golang-ci | |
- name: Lint YAML | |
run: make BUILD_IN_CONTAINER=false lint-yaml-ci |