-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ahmad Nassri
committed
May 27, 2021
1 parent
ac71dd4
commit c910498
Showing
3 changed files
with
53 additions
and
130 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,29 +7,47 @@ on: pull_request_target | |
name: pull_request_target | ||
|
||
jobs: | ||
auto-merge: | ||
# only run for dependabot | ||
if: github.actor == 'dependabot[bot]' | ||
metadata: | ||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
repository: ${{ steps.metadata.outputs.repository }} | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- uses: ahmadnassri/action-metadata@v1 | ||
id: metadata | ||
|
||
auto-merge: | ||
timeout-minutes: 5 | ||
|
||
runs-on: ubuntu-latest | ||
|
||
# only run for dependabot PRs | ||
if: ${{ github.actor == 'dependabot[bot]' }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ahmadnassri/[email protected] | ||
with: | ||
github-token: ${{ secrets.GH_TOKEN }} | ||
|
||
template-sync: | ||
needs: metadata | ||
|
||
timeout-minutes: 20 | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
# only run for templates | ||
if: ${{ fromJSON(needs.metadata.outputs.repository).is_template }} | ||
|
||
- uses: ahmadnassri/action-template-repository-sync@v1 | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
- uses: ahmadnassri/[email protected] | ||
- uses: ahmadnassri/[email protected] | ||
- uses: ahmadnassri/[email protected] | ||
with: | ||
github-token: ${{ secrets.GH_TOKEN }} | ||
dry-run: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,24 @@ | ||
# ------------------------------------------------------------- # | ||
# Note: this file is automatically managed in template-template # | ||
# Note: this file is automatically managed in template-node-lib # | ||
# ------------------------------------------------------------- # | ||
|
||
on: push | ||
|
||
name: push | ||
|
||
jobs: | ||
metadata: | ||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
repository: ${{ steps.metadata.outputs.repository }} | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- uses: ahmadnassri/action-metadata@v1 | ||
id: metadata | ||
|
||
commit-lint: | ||
timeout-minutes: 5 | ||
|
||
|
@@ -29,7 +41,7 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- uses: github/super-linter@v3.15.5 | ||
- uses: github/super-linter@v4.0.2 | ||
env: | ||
LOG_LEVEL: ERROR | ||
VALIDATE_ALL_CODEBASE: false | ||
|
@@ -49,11 +61,6 @@ jobs: | |
- run: npm audit --audit-level=critical | ||
|
||
test-strategy: | ||
needs: | ||
- commit-lint | ||
- super-linter | ||
- npm-audit | ||
|
||
timeout-minutes: 5 | ||
|
||
runs-on: ubuntu-latest | ||
|
@@ -67,7 +74,11 @@ jobs: | |
run: echo "::set-output name=matrix::$(jq -c . < .github/matrix.json)" | ||
|
||
test-run: | ||
needs: test-strategy | ||
needs: | ||
- commit-lint | ||
- super-linter | ||
- npm-audit | ||
- test-strategy | ||
|
||
timeout-minutes: 5 | ||
|
||
|
@@ -87,7 +98,7 @@ jobs: | |
with: | ||
submodules: true | ||
|
||
- uses: actions/[email protected].5 | ||
- uses: actions/[email protected].4 | ||
with: | ||
path: ~/.npm | ||
key: ${{ matrix.os }}-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }} | ||
|
@@ -148,10 +159,16 @@ jobs: | |
npm publish | ||
template-sync: | ||
needs: release | ||
needs: | ||
- metadata | ||
- release | ||
|
||
timeout-minutes: 20 | ||
|
||
# only runs on main branch and only for the template | ||
if: ${{ github.ref == 'refs/heads/master' && | ||
fromJSON(needs.metadata.outputs.repository).is_template }} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|