diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml deleted file mode 100644 index 9dcdc52..0000000 --- a/.github/workflows/actionlint.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Lint workflow files - -on: - push: - branches: - - main - paths: - - .github/workflows/** - pull_request: - types: [ opened, synchronize, reopened ] # Same as default - paths: - - .github/workflows/** - -permissions: - contents: read - -jobs: - actionlint: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Lint workflow files - shell: bash - run: | - bash <(curl -LsS --retry 2 https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) - ./actionlint -color \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..dc0c543 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,36 @@ +name: Lint + +on: + push: + branches: + - main + pull_request: + types: [ opened, synchronize, reopened ] # Same as default + +permissions: + contents: read + +jobs: + paths: + runs-on: ubuntu-latest + outputs: + action: ${{ (github.event_name == 'pull_request' && steps.filter.outputs.action) || github.event_name == 'push' }} + steps: + - uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + action: + - ".github/**" + + action: + needs: paths + if: ${{ needs.paths.outputs.action == 'true' }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: reviewdog/action-actionlint@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + reporter: github-pr-review + fail_on_error: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 529e3a3..7ee3b2f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: - update_release_draft: + draft: name: update release draft runs-on: ubuntu-latest outputs: @@ -30,9 +30,9 @@ jobs: environment: release runs-on: ubuntu-latest if: github.event_name == 'workflow_dispatch' - needs: update_release_draft + needs: draft env: - VERSION: ${{ needs.update_release_draft.outputs.tag_name }} + VERSION: ${{ needs.draft.outputs.tag_name }} steps: - uses: release-drafter/release-drafter@v6 id: release-drafter