Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
security: rotate npm credentials
  • Loading branch information
ThisIsMissEm committed May 27, 2022
commit c8e5f7347d854e6d621b3ab650e3ef2f78ceea78
4 changes: 2 additions & 2 deletions .github/workflows/cd-teardown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
run: |
export EXISTING_TAGS=$(npm dist-tag ls @inrupt/solid-client | grep --count $TAG_SLUG)
# Unfortunately GitHub Actions does not currently let us do something like
# if: secrets.NPM_TOKEN != ''
# if: secrets.INRUPT_NPM_TOKEN != ''
# so simply skip the command if the env var is not set:
if [ -n $NODE_AUTH_TOKEN ] && [ $EXISTING_TAGS -eq 1 ]; then npm dist-tag rm @inrupt/solid-client $TAG_SLUG; fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.INRUPT_NPM_TOKEN }}
- run: echo "Package tag [$TAG_SLUG] unpublished."
4 changes: 2 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ jobs:
if: github.actor != 'dependabot[bot]'
run: |
# Unfortunately GitHub Actions does not currently let us do something like
# if: secrets.NPM_TOKEN != ''
# if: secrets.INRUPT_NPM_TOKEN != ''
# so simply skip the command if the env var is not set:
if [ -z $NODE_AUTH_TOKEN ]; then echo "No npm token defined; package not published."; fi
if [ -n $NODE_AUTH_TOKEN ]; then npm publish --access public --tag "$TAG_SLUG"; fi
if [ -n $NODE_AUTH_TOKEN ]; then echo "Package published. To install, run:"; fi
if [ -n $NODE_AUTH_TOKEN ]; then echo ""; fi
if [ -n $NODE_AUTH_TOKEN ]; then echo " npm install @inrupt/solid-ui-react@$TAG_SLUG"; fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.INRUPT_NPM_TOKEN }}
TAG_SLUG: ${{ needs.prepare-deployment.outputs.tag-slug }}
- name: Mark GitHub Deployment as successful
if: github.actor != 'dependabot[bot]'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
echo ""
echo " npm install @inrupt/solid-ui-react"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.INRUPT_NPM_TOKEN }}
- name: Mark GitHub Deployment as successful
uses: octokit/[email protected]
with:
Expand Down