Skip to content

Commit f0a50e0

Browse files
committed
Pass PAT to composite action as input; Cleanup environment vars
1 parent ec9bdf9 commit f0a50e0

File tree

4 files changed

+14
-25
lines changed

4 files changed

+14
-25
lines changed

.github/actions/build-artifacts/action.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Build Docs Artifacts
22
description: Builds the documentation artifacts including Docusaus, Sample App and Designer
3+
inputs:
4+
PERSONAL_ACCESS_TOKEN:
5+
description: 'A Github PAT'
6+
required: true
37
runs:
48
using: "composite"
59
steps:
@@ -41,7 +45,7 @@ runs:
4145

4246
- name: Download designer (v1)
4347
env:
44-
NODE_AUTH_TOKEN: ${{secrets.PERSONAL_ACCESS_TOKEN}}
48+
NODE_AUTH_TOKEN: ${{ inputs.PERSONAL_ACCESS_TOKEN }}
4549
run: |
4650
rm -rf package *.tgz
4751
npm pack @public-ui/designer@^1
@@ -55,7 +59,7 @@ runs:
5559
5660
- name: Download sample react (v1)
5761
env:
58-
NODE_AUTH_TOKEN: ${{secrets.PERSONAL_ACCESS_TOKEN}}
62+
NODE_AUTH_TOKEN: ${{ inputs.PERSONAL_ACCESS_TOKEN }}
5963
run: |
6064
rm -rf package *.tgz
6165
npm pack @public-ui/sample-react@^1
@@ -69,7 +73,7 @@ runs:
6973
7074
- name: Download designer (v2)
7175
env:
72-
NODE_AUTH_TOKEN: ${{secrets.PERSONAL_ACCESS_TOKEN}}
76+
NODE_AUTH_TOKEN: ${{ inputs.PERSONAL_ACCESS_TOKEN }}
7377
run: |
7478
rm -rf package *.tgz
7579
npm pack @public-ui/designer@^2
@@ -83,7 +87,7 @@ runs:
8387
8488
- name: Download sample react (v2)
8589
env:
86-
NODE_AUTH_TOKEN: ${{secrets.PERSONAL_ACCESS_TOKEN}}
90+
NODE_AUTH_TOKEN: ${{ inputs.PERSONAL_ACCESS_TOKEN }}
8791
run: |
8892
rm -rf package *.tgz
8993
npm pack @public-ui/sample-react@^2

.github/workflows/draft-deploy.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
name: Netlify Draft Deploy
22

3-
env:
4-
github-registry: https://npm.pkg.github.com
5-
github-token: ${{ secrets.GITHUB_TOKEN }}
6-
npmjs-registry: https://registry.npmjs.org
7-
scope: public-ui
8-
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
9-
103
on:
114
workflow_dispatch:
125
pull_request:
@@ -21,6 +14,8 @@ jobs:
2114

2215
- name: Build Artifacts
2316
uses: ./.github/actions/build-artifacts
17+
with:
18+
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
2419

2520
- name: Netlify Deploy
2621
uses: netlify/actions/cli@master

.github/workflows/test-deploy.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
name: Netlify Test Deploy - Deploy main branch under fixed alias
22

3-
env:
4-
github-registry: https://npm.pkg.github.com
5-
github-token: ${{ secrets.GITHUB_TOKEN }}
6-
npmjs-registry: https://registry.npmjs.org
7-
scope: public-ui
8-
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
9-
103
on:
114
push:
125
branches:
@@ -22,6 +15,8 @@ jobs:
2215

2316
- name: Build Artifacts
2417
uses: ./.github/actions/build-artifacts
18+
with:
19+
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
2520

2621
- name: Netlify Deploy
2722
uses: netlify/actions/cli@master

.github/workflows/update.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
name: Update GitHub page
22

3-
env:
4-
github-registry: https://npm.pkg.github.com
5-
github-token: ${{ secrets.GITHUB_TOKEN }}
6-
npmjs-registry: https://registry.npmjs.org
7-
scope: public-ui
8-
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
9-
103
on:
114
push:
125
branches:
@@ -34,6 +27,8 @@ jobs:
3427

3528
- name: Build Artifacts
3629
uses: ./.github/actions/build-artifacts
30+
with:
31+
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
3732

3833
- name: Setup Pages
3934
uses: actions/configure-pages@v5

0 commit comments

Comments
 (0)