Skip to content

Commit

Permalink
[actions] add reusable workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Oct 13, 2022
1 parent 26a9ae3 commit 9a8fd34
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 3 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/node-aught.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'Tests: node.js < 10'

on: [pull_request, push]

permissions:
contents: read

jobs:
tests:
uses: ljharb/actions/.github/workflows/node.yml@main
with:
range: '< 10'
type: minors
command: npm run tests-only

node:
name: 'node < 10'
needs: [tests]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'
10 changes: 10 additions & 0 deletions .github/workflows/node-pretest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: 'Tests: pretest/posttest'

on: [pull_request, push]

permissions:
contents: read

jobs:
tests:
uses: ljharb/actions/.github/workflows/pretest.yml@main
21 changes: 21 additions & 0 deletions .github/workflows/node-tens.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'Tests: node.js >= 10'

on: [pull_request, push]

permissions:
contents: read

jobs:
tests:
uses: ljharb/actions/.github/workflows/node.yml@main
with:
range: '>= 10'
type: minors
command: npm run tests-only

node:
name: 'node >= 10'
needs: [tests]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'
22 changes: 22 additions & 0 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Automatic Rebase

on: [pull_request_target]

permissions:
contents: read

jobs:
_:
permissions:
contents: write # for ljharb/rebase to push code to rebase
pull-requests: read # for ljharb/rebase to get info about PR

name: "Automatic Rebase"

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: ljharb/rebase@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 18 additions & 0 deletions .github/workflows/require-allow-edits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Require “Allow Edits”

on: [pull_request_target]

permissions:
contents: read

jobs:
_:
permissions:
pull-requests: read # for ljharb/require-allow-edits to check 'allow edits' on PR

name: "Require “Allow Edits”"

runs-on: ubuntu-latest

steps:
- uses: ljharb/require-allow-edits@main
3 changes: 0 additions & 3 deletions .travis.yml

This file was deleted.

0 comments on commit 9a8fd34

Please sign in to comment.