diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml new file mode 100644 index 0000000..b86f6d6 --- /dev/null +++ b/.github/workflows/actionlint.yml @@ -0,0 +1,39 @@ +name: Lint GitHub Actions Workflows + +on: + pull_request: + paths: + - '.github/workflows/*.yml' + - '.github/workflows/*.yaml' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + pull-requests: write + checks: write + actions: write +jobs: + lint: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Generate GitHub App Token + uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0 + id: generate-token + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.APP_PRIVATE_KEY }} + - name: run actionlint + uses: reviewdog/action-actionlint@db58217885f9a6570da9c71be4e40ec33fe44a1f # v1.65.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + reporter: github-pr-review + - name: run pinact-actions + uses: suzuki-shunsuke/pinact-action@d735505f3decf76fca3fdbb4c952e5b3eba0ffdd # v0.1.2 + with: + github_token: ${{ steps.generate-token.outputs.token }} diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index e6bd179..d4069da 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -12,9 +12,9 @@ jobs: all_tests: runs-on: macos-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Cache bundle directory - uses: actions/cache@v4 + uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2 with: path: vendor/bundle key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 6828f27..811b2be 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -11,9 +11,9 @@ jobs: main_tests: runs-on: macos-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Cache bundle directory - uses: actions/cache@v4 + uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2 with: path: vendor/bundle key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}