Skip to content

Commit

Permalink
fix: two ci action groups (test) (#560)
Browse files Browse the repository at this point in the history
* test two ci action groups

* split into two files

* syntax

* fix CI-labeler invalid name

* test naming

* add `jobs:`

* Wait for the entire workflow
  • Loading branch information
c-ehrlich committed Oct 4, 2022
1 parent cfd5df1 commit 1fcf8a9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 13 deletions.
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

0 comments on commit 1fcf8a9

Please sign in to comment.