Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

security: rotate npm credentials #270

Merged
merged 1 commit into from
May 31, 2022
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
4 changes: 2 additions & 2 deletions .github/workflows/cd-teardown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
- name: Remove npm tag for the deleted branch
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 [ -n $NODE_AUTH_TOKEN ]; then npm dist-tag rm @inrupt/solid-client-notifications $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 @@ -87,15 +87,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-client-notifications@$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 @@ -61,7 +61,7 @@ jobs:
echo ""
echo " npm install @inrupt/solid-client-notifications"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.INRUPT_NPM_TOKEN }}
- name: Mark GitHub Deployment as successful
uses: octokit/request-action@v2.x
with:
Expand Down