From d64a8e8ef91d542588026325bab17484565222b7 Mon Sep 17 00:00:00 2001 From: VeyronSakai Date: Mon, 8 Apr 2024 00:29:22 +0900 Subject: [PATCH 1/2] Refactor Lint workflow --- .github/workflows/actionlint.yml | 28 ------------------------- .github/workflows/lint.yml | 36 ++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 28 deletions(-) delete mode 100644 .github/workflows/actionlint.yml create mode 100644 .github/workflows/lint.yml 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 From dcb602614b3d96db58e82e2237ce92dcf7e3ea0a Mon Sep 17 00:00:00 2001 From: VeyronSakai Date: Mon, 8 Apr 2024 00:31:36 +0900 Subject: [PATCH 2/2] rename job --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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