Skip to content

Commit

Permalink
Merge pull request #16 from VeyronSakai/ci/refactor-lint-workflow
Browse files Browse the repository at this point in the history
Refactor Lint workflow
  • Loading branch information
VeyronSakai authored Apr 7, 2024
2 parents 6963ff6 + dcb6026 commit cd3a5ea
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 31 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/actionlint.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
update_release_draft:
draft:
name: update release draft
runs-on: ubuntu-latest
outputs:
Expand All @@ -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
Expand Down

0 comments on commit cd3a5ea

Please sign in to comment.