mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-09 15:37:56 -05:00
Add Actionlint workflow, fix Build workflow. (#11016)
* Add Actionlint workflow, fix Build workflow. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * More Linting... Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Update actionlint version. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Adjust actionlint flags. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Make fail_level none for actionlint until upstream bugs are fixed. Signed-off-by: Satadru Pramanik <satadru@gmail.com> --------- Signed-off-by: Satadru Pramanik <satadru@gmail.com>
This commit is contained in:
committed by
GitHub
parent
87570dbabf
commit
c99532d1dd
21
.github/workflows/Actionlint.yml
vendored
Normal file
21
.github/workflows/Actionlint.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
name: ActionLint
|
||||
on: workflow_call
|
||||
env:
|
||||
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.CREW_PR_TOKEN }}
|
||||
GH_TOKEN: ${{ secrets.CREW_PR_TOKEN }}
|
||||
REVIEWDOG_TOKEN: ${{ secrets.CREW_PR_TOKEN }}
|
||||
jobs:
|
||||
yamllint:
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: YAMLLint
|
||||
uses: reviewdog/action-actionlint@6612efe1589ccf23cb1320d11fced44b86fb5ad7 # Post v1.7.4 commit to support fail_level
|
||||
with:
|
||||
actionlint_flags: "-shellcheck ''"
|
||||
fail_level: none
|
||||
reporter: github-pr-review
|
||||
3
.github/workflows/Build.yml
vendored
3
.github/workflows/Build.yml
vendored
@@ -48,6 +48,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: true
|
||||
ref: ${{ inputs.branch || github.ref_name }}
|
||||
- name: Rebase to master
|
||||
run: |
|
||||
git config user.name "${{ github.actor }}"
|
||||
@@ -288,6 +289,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: true
|
||||
ref: ${{ inputs.branch || github.ref_name }}
|
||||
- name: Get all changed manifest files
|
||||
id: changed-manifest-files
|
||||
uses: tj-actions/changed-files@v45
|
||||
@@ -300,6 +302,7 @@ jobs:
|
||||
git config user.name "${{ github.actor }}"
|
||||
git config user.email "${{ github.actor }}@users.noreply.github.com"
|
||||
git fetch origin
|
||||
git checkout ${{ env.BRANCH }}
|
||||
git reset --hard origin/${{ env.BRANCH }}
|
||||
git pull --rebase origin master && git push -f
|
||||
git log --oneline -10
|
||||
|
||||
5
.github/workflows/Linter-Handoff.yml
vendored
5
.github/workflows/Linter-Handoff.yml
vendored
@@ -55,6 +55,10 @@ jobs:
|
||||
needs: handoff
|
||||
if: contains(needs.handoff.outputs.category, 'YAML')
|
||||
uses: ./.github/workflows/YAMLlint.yml
|
||||
action-yaml:
|
||||
needs: handoff
|
||||
if: contains(needs.handoff.outputs.category, 'YAML')
|
||||
uses: ./.github/workflows/Actionlint.yml
|
||||
linter-tests:
|
||||
runs-on: ubuntu-24.04
|
||||
needs:
|
||||
@@ -63,6 +67,7 @@ jobs:
|
||||
- ruby
|
||||
- bash
|
||||
- yaml
|
||||
- action-yaml
|
||||
if: ${{ !cancelled() }}
|
||||
steps:
|
||||
- name: fail if linter jobs failed
|
||||
|
||||
5
.github/workflows/Markdown-lint.yml
vendored
5
.github/workflows/Markdown-lint.yml
vendored
@@ -1,6 +1,9 @@
|
||||
---
|
||||
name: Markdown-lint
|
||||
on: workflow_call
|
||||
env:
|
||||
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.CREW_PR_TOKEN }}
|
||||
GH_TOKEN: ${{ secrets.CREW_PR_TOKEN }}
|
||||
jobs:
|
||||
markdown-lint:
|
||||
runs-on: ubuntu-24.04
|
||||
@@ -14,4 +17,4 @@ jobs:
|
||||
with:
|
||||
fail_level: any
|
||||
markdownlint_flags: '-s .mdl_style.rb'
|
||||
reporter: github-pr-check
|
||||
reporter: github-pr-review
|
||||
|
||||
5
.github/workflows/Rubocop.yml
vendored
5
.github/workflows/Rubocop.yml
vendored
@@ -1,6 +1,9 @@
|
||||
---
|
||||
name: Rubocop
|
||||
on: workflow_call
|
||||
env:
|
||||
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.CREW_PR_TOKEN }}
|
||||
GH_TOKEN: ${{ secrets.CREW_PR_TOKEN }}
|
||||
jobs:
|
||||
rubocop:
|
||||
runs-on: ubuntu-24.04
|
||||
@@ -18,4 +21,4 @@ jobs:
|
||||
fail_level: any
|
||||
filter_mode: nofilter
|
||||
only_changed: true
|
||||
reporter: github-pr-check
|
||||
reporter: github-pr-review
|
||||
|
||||
5
.github/workflows/ShellCheck.yml
vendored
5
.github/workflows/ShellCheck.yml
vendored
@@ -1,6 +1,9 @@
|
||||
---
|
||||
name: ShellCheck
|
||||
on: workflow_call
|
||||
env:
|
||||
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.CREW_PR_TOKEN }}
|
||||
GH_TOKEN: ${{ secrets.CREW_PR_TOKEN }}
|
||||
jobs:
|
||||
shellcheck:
|
||||
runs-on: ubuntu-24.04
|
||||
@@ -14,4 +17,4 @@ jobs:
|
||||
with:
|
||||
exclude: './tools/*'
|
||||
fail_level: any
|
||||
reporter: github-pr-check
|
||||
reporter: github-pr-review
|
||||
|
||||
5
.github/workflows/YAMLlint.yml
vendored
5
.github/workflows/YAMLlint.yml
vendored
@@ -1,6 +1,9 @@
|
||||
---
|
||||
name: YAMLLint
|
||||
on: workflow_call
|
||||
env:
|
||||
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.CREW_PR_TOKEN }}
|
||||
GH_TOKEN: ${{ secrets.CREW_PR_TOKEN }}
|
||||
jobs:
|
||||
yamllint:
|
||||
runs-on: ubuntu-24.04
|
||||
@@ -13,4 +16,4 @@ jobs:
|
||||
uses: reviewdog/action-yamllint@v1
|
||||
with:
|
||||
fail_level: any
|
||||
reporter: github-pr-check
|
||||
reporter: github-pr-review
|
||||
|
||||
Reference in New Issue
Block a user