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

fix: two ci action groups (test) #560

Merged
merged 7 commits into from
Oct 4, 2022
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
22 changes: 22 additions & 0 deletions .github/workflows/ci-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# this workflow will run on every pr to make sure the project is following the guidelines

# run labeler with elevated permissions before other actions

name: Labeler

on:
pull_request_target:
branches: ["*"]

jobs:
labeler:
name: Label PR
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: true
17 changes: 4 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# this workflow will run on every pr to make sure the project is following the guidelines

# after labeler, run other actions with strict permissions
name: CI

on:
pull_request:
workflow_run:
workflows: [Labeler]
types: [completed]
branches: ["*"]

env:
Expand All @@ -19,18 +22,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

labeler:
name: Label PR
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: true

lint:
runs-on: ubuntu-latest
name: Run ESLint
Expand Down