diff --git a/.github/workflows/lint_pr.yaml b/.github/workflows/lint_pr.yaml index 6411d5c..3e9e48d 100644 --- a/.github/workflows/lint_pr.yaml +++ b/.github/workflows/lint_pr.yaml @@ -1,35 +1,23 @@ --- name: Lint PR on: # yamllint disable-line rule:truthy - pull_request_target: - types: - - opened - - edited - - synchronize - - reopened - -permissions: - pull-requests: read + pull_request: + branches: [main] jobs: - main: - name: Validate PR title - runs-on: ubuntu-latest - steps: - - uses: amannn/action-semantic-pull-request@v5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} shellcheck: - name: shellcheck + name: Run shellcheck runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Display shellcheck version - run: shellcheck --version - name: shellcheck - run: shellcheck -x **/*.sh + uses: ludeeus/action-shellcheck@master + env: + SHELLCHECK_OPTS: -x + with: + ignore_names: .zshrc .zprofile yamllint: - name: yamllint + name: Run yamllint runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/validate_pr.yaml b/.github/workflows/validate_pr.yaml index 7377eed..1bad9fe 100644 --- a/.github/workflows/validate_pr.yaml +++ b/.github/workflows/validate_pr.yaml @@ -1,17 +1,21 @@ --- name: Validate Pull Request on: # yamllint disable-line rule:truthy - pull_request: - branches: [main] + pull_request_target: + types: + - opened + - edited + - synchronize + - reopened + +permissions: + pull-requests: read jobs: - shellcheck: + main: + name: Validate PR title runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: shellcheck - uses: ludeeus/action-shellcheck@master + - uses: amannn/action-semantic-pull-request@v5 env: - SHELLCHECK_OPTS: -x - with: - ignore_names: .zshrc .zprofile + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}