Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added actionlint to validate workflows #102

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build
name: Build
on:
workflow_dispatch:
workflow_call:
Expand All @@ -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
Expand All @@ -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:'
7 changes: 3 additions & 4 deletions .github/workflows/dependabot_automerge.yml
Original file line number Diff line number Diff line change
@@ -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 ]

Expand All @@ -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 }}
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: release
name: Release
on:
release:
types: [published]
Expand All @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-gradle-wrapper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading