diff --git a/.github/workflows/setup-host/action.yml b/.github/actions/setup-host/action.yml similarity index 100% rename from .github/workflows/setup-host/action.yml rename to .github/actions/setup-host/action.yml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 129a668..1fef472 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,4 +1,4 @@ -name: build +name: Build on: workflow_dispatch: workflow_call: @@ -23,7 +23,7 @@ jobs: with: fetch-depth: 0 - name: Setup host - uses: ./.github/workflows/setup-host + uses: ./.github/actions/setup-host - name: Test & Build run: ./gradlew -s build - name: Publish Test Report @@ -33,3 +33,16 @@ jobs: report_paths: '**/build/test-results/*/TEST-*.xml' - name: Coverage report uses: codecov/codecov-action@v3 + + actionlint: + name: Validate Workflows + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Download actionlint + shell: bash + run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) + - name: Check workflow files + shell: bash + run: ./actionlint -color -format '{{range $err := .}}::error file={{$err.Filepath}},line={{$err.Line}},col={{$err.Column}}::{{$err.Message}}%0A```%0A{{replace $err.Snippet "\\n" "%0A"}}%0A```\n{{end}}' -ignore 'SC2016:' diff --git a/.github/workflows/dependabot_automerge.yml b/.github/workflows/dependabot_automerge.yml index 9768838..bf9c552 100644 --- a/.github/workflows/dependabot_automerge.yml +++ b/.github/workflows/dependabot_automerge.yml @@ -1,6 +1,6 @@ # https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#enable-auto-merge-on-a-pull-request name: Dependabot auto-merge -on: +on: pull_request: types: [ opened, synchronize, reopened, labeled ] @@ -14,7 +14,6 @@ jobs: if: ${{ contains(github.event.pull_request.labels.*.name, 'dependencies') }} steps: - name: Enable auto-merge for Dependabot PRs - run: gh pr merge --auto --rebase "$PR_URL" + run: gh pr merge --auto --rebase ${{ github.event.pull_request.html_url }} env: - PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index dfbee4b..04d1559 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,4 +1,4 @@ -name: release +name: Release on: release: types: [published] @@ -18,7 +18,7 @@ jobs: with: fetch-depth: 0 - name: Setup host - uses: ./.github/workflows/setup-host + uses: ./.github/actions/setup-host - name: Publish env: GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }} diff --git a/.github/workflows/update-gradle-wrapper.yml b/.github/workflows/update-gradle-wrapper.yml index 654e50e..7aa18dc 100644 --- a/.github/workflows/update-gradle-wrapper.yml +++ b/.github/workflows/update-gradle-wrapper.yml @@ -13,7 +13,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Setup host - uses: ./.github/workflows/setup-host + uses: ./.github/actions/setup-host - name: Update Gradle Wrapper uses: gradle-update/update-gradle-wrapper-action@v1 with: