Skip to content

Commit

Permalink
ci: Fix paths-ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
ginokent committed Jun 2, 2024
1 parent 9abadd1 commit f867a14
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
36 changes: 19 additions & 17 deletions .github/workflows/go-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,7 @@ on:
push:
branches:
- main
paths-ignore:
- '.github/dependabot.yml'
- '.github/pull_request_template.md'
- '.github/release.yml'
- '.github/workflows/label-checker.yml'
- '.github/workflows/task-list-checker.yml'
- '**.md'
pull_request:
paths-ignore:
- '.github/dependabot.yml'
- '.github/pull_request_template.md'
- '.github/release.yml'
- '.github/workflows/label-checker.yml'
- '.github/workflows/task-list-checker.yml'
- '**.md'
workflow_dispatch:
inputs: {}

Expand All @@ -42,9 +28,25 @@ defaults:
shell: bash

jobs:
go-lint: # NOTE: for Branch protection rule `Status checks that are required.`
name: Run golangci-lint
runs-on: ubuntu-latest # ref. https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
paths-ignore:
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.paths-ignore.outputs.skip }}
steps:
- uses: kunitsucom/github-actions-paths-ignore-alternative@main
id: paths-ignore
with:
paths-ignore: |-
# substrings of file paths to ignore written in regular expressions
^.github/dependabot.yml$
^.github/pull_request_template.md$
^.github/release.yml$
^.github/workflows/label-checker.yml$
^.github/workflows/task-list-checker.yml$
go-lint:
runs-on: ubuntu-latest
needs: paths-ignore
if: ${{ needs.paths-ignore.outputs.skip != 'true' }}
steps:
- uses: actions/checkout@v4
- name: DEBUG
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ jobs:
^.github/release.yml$
^.github/workflows/label-checker.yml$
^.github/workflows/task-list-checker.yml$
go-test: # NOTE: for Branch protection rule `Status checks that are required.`
name: Run go test
runs-on: ubuntu-latest # ref. https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
go-test:
runs-on: ubuntu-latest
needs: paths-ignore
if: ${{ needs.paths-ignore.outputs.skip != 'true' }}
steps:
Expand Down

0 comments on commit f867a14

Please sign in to comment.