Skip to content

Commit 80211f8

Browse files
amulyakashyap09Amulya Kashyap
andauthored
ACNA-1828 | Externalised the workflow (#44)
* changed the workflow * added secrets inherit --------- Co-authored-by: Amulya Kashyap <[email protected]>
1 parent 85e94e7 commit 80211f8

File tree

5 files changed

+9
-110
lines changed

5 files changed

+9
-110
lines changed

.github/workflows/daily.yml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,5 @@ on:
88

99
jobs:
1010
build:
11-
if: github.repository_owner == 'adobe'
12-
runs-on: ${{ matrix.os }}
13-
strategy:
14-
matrix:
15-
node-version: [18.x, 20.x]
16-
os: [ubuntu-latest]
17-
18-
steps:
19-
- uses: actions/checkout@v2
20-
- name: Use Node.js ${{ matrix.node-version }}
21-
uses: actions/setup-node@v1
22-
with:
23-
node-version: ${{ matrix.node-version }}
24-
- run: npm i --package-lock --package-lock-only
25-
- run: npm ci
26-
- name: run unit tests
27-
run: npm run test
28-
- name: Slack Notification
29-
if: ${{ failure() }}
30-
uses: rtCamp/action-slack-notify@v2
31-
env:
32-
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
33-
SLACK_TITLE: 'Node version'
34-
SLACK_MESSAGE: ${{ matrix.node-version }}
35-
SLACK_COLOR: ${{ job.status == 'success' && 'good' || job.status == 'cancelled' && '#808080' || 'danger' }}
36-
11+
uses: adobe/aio-reusable-workflows/.github/workflows/daily.yml@main
12+
secrets: inherit

.github/workflows/node.js.yml

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,4 @@ on:
1111

1212
jobs:
1313
build:
14-
runs-on: ${{ matrix.os }}
15-
strategy:
16-
matrix:
17-
node-version: [18.x, 20.x]
18-
os: [ubuntu-latest, windows-latest]
19-
20-
steps:
21-
- uses: actions/checkout@v2
22-
with:
23-
fetch-depth: 0
24-
- name: Use Node.js ${{ matrix.node-version }}
25-
uses: actions/setup-node@v1
26-
with:
27-
node-version: ${{ matrix.node-version }}
28-
- run: npm i --package-lock --package-lock-only
29-
- run: npm ci
30-
- run: npm run build --if-present
31-
- run: npm test
32-
- name: upload coverage
33-
if: success()
34-
uses: codecov/[email protected]
35-
with:
36-
name: ${{ runner.os }} node.js ${{ matrix.node-version }}
14+
uses: adobe/aio-reusable-workflows/.github/workflows/node.js.yml@main

.github/workflows/on-push-publish-to-npm.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,5 @@ on:
77
- "package.json"
88
jobs:
99
publish:
10-
if: github.repository_owner == 'adobe'
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/checkout@v2
14-
- uses: actions/setup-node@v1
15-
with:
16-
node-version: 18
17-
- run: npm install
18-
- run: npm test
19-
- uses: JS-DevTools/npm-publish@v1
20-
with:
21-
token: ${{ secrets.ADOBE_BOT_NPM_TOKEN }}
10+
uses: adobe/aio-reusable-workflows/.github/workflows/on-push-publish-to-npm.yml@main
11+
secrets: inherit

.github/workflows/prerelease.yml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,5 @@ on:
1717

1818
jobs:
1919
checkout:
20-
name: checkout
21-
runs-on: ubuntu-latest
22-
steps:
23-
- uses: actions/checkout@v2
24-
- run: |
25-
git config user.name github-actions
26-
git config user.email [email protected]
27-
- uses: actions/setup-node@v1
28-
with:
29-
node-version: 18
30-
- run: |
31-
npm install
32-
npm test
33-
- name: Update your package.json with an npm pre-release version
34-
id: pre-release-version
35-
uses: adobe/[email protected]
36-
with:
37-
pre-release-tag: ${{ github.event.inputs.pre-release-tag }}
38-
dependencies-to-update: ${{ github.event.inputs.dependencies-to-update }}
39-
dependencies-to-update-version-tag: ${{ github.event.inputs.dist-tag }}
40-
- run: echo pre-release-version - ${{ steps.pre-release-version.outputs.pre-release-version }}
41-
- uses: JS-DevTools/npm-publish@v1
42-
with:
43-
token: ${{ secrets.ADOBE_BOT_NPM_TOKEN }}
44-
tag: ${{ github.event.inputs.dist-tag }}
45-
access: 'public'
20+
uses: adobe/aio-reusable-workflows/.github/workflows/prerelease.yml@main
21+
secrets: inherit

.github/workflows/version-bump-publish.yml

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,5 @@ on:
1212
default: 'latest'
1313
jobs:
1414
checkout:
15-
name: checkout
16-
runs-on: ubuntu-latest
17-
steps:
18-
- uses: actions/checkout@v2
19-
- run: |
20-
git config user.name github-actions
21-
git config user.email [email protected]
22-
- uses: actions/setup-node@v1
23-
with:
24-
node-version: 18
25-
- run: |
26-
npm install
27-
npm test
28-
- name: bump and pub
29-
if: ${{ github.event.inputs.level != '' }}
30-
run: |
31-
npm version ${{ github.event.inputs.level }}
32-
git push
33-
- uses: JS-DevTools/npm-publish@v1
34-
with:
35-
token: ${{ secrets.ADOBE_BOT_NPM_TOKEN }}
36-
tag: ${{ github.event.inputs.tag }}
37-
access: 'public'
15+
uses: adobe/aio-reusable-workflows/.github/workflows/version-bump-publish.yml@main
16+
secrets: inherit

0 commit comments

Comments
 (0)