Skip to content

Commit

Permalink
fix: shrink action (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
mew-ton authored Aug 27, 2023
1 parent 05dbe3c commit 2092d88
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 19 deletions.
5 changes: 5 additions & 0 deletions .changeset/cuddly-poets-clap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"type-assurer": patch
---

chore: Save time running github actions.
30 changes: 30 additions & 0 deletions .github/workflows/lint__actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Lint Code Base (GitHub Actions)
run-name: "Lint code base on \"${{ github.event.pull_request.title }}\" by ${{ github.actor }}"

permissions:
contents: read
packages: read
pull-requests: write

on:
pull_request:
types: [opened, synchronize]
paths:
- .github/workflows
- .github/actions

jobs:
actionlint:
name: "Lint: GitHub Actions"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: github actions lint
uses: reviewdog/action-actionlint@v1
with:
filter_mode: diff_context
fail_on_error: true
reporter: github-pr-review
github_token: ${{ secrets.GITHUB_TOKEN }}
19 changes: 2 additions & 17 deletions .github/workflows/lint.yml → .github/workflows/lint__es.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Lint Code Base
name: Lint Code Base (ESLint)
run-name: "Lint code base on \"${{ github.event.pull_request.title }}\" by ${{ github.actor }}"

permissions:
Expand All @@ -12,27 +12,12 @@ on:
types: [opened, synchronize]

jobs:
actionlint:
if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]' }}
name: "Lint: GitHub Actions"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: github actions lint
uses: reviewdog/action-actionlint@v1
with:
filter_mode: diff_context
fail_on_error: true
reporter: github-pr-review
github_token: ${{ secrets.GITHUB_TOKEN }}

eslint:
name: "Lint: ESLint"
if: |
(contains(github.event.pull_request.labels.*.name, 'renovate') &&
contains(github.event.pull_request.labels.*.name, 'renovate:lint')) ||
contains(github.event.pull_request.labels.*.name, 'renovate') == false
!contains(github.event.pull_request.labels.*.name, 'renovate')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ on:
jobs:
init__node:
if: |
contains(github.event.pull_request.labels.*.name, 'renovate') == false ||
(contains(github.event.pull_request.labels.*.name, 'renovate') &&
contains(github.event.pull_request.labels.*.name, 'renovate:lint') == false)
contains(github.event.pull_request.labels.*.name, 'renovate:npm')) ||
!contains(github.event.pull_request.labels.*.name, 'renovate')
name: "Initialize: node"
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 2092d88

Please sign in to comment.