Skip to content

Commit

Permalink
fix: token as input
Browse files Browse the repository at this point in the history
  • Loading branch information
receter committed Oct 17, 2024
1 parent 21a743e commit 770e70b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/init-npm/action.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Init npm

permissions:
contents: read
inputs:
node_auth_token_github:
description: "The token that is needed to authenticate with GitHub Package Registry"
required: true

runs:
using: "composite"
Expand All @@ -13,7 +15,7 @@ runs:
registry-url: https://registry.npmjs.org

- name: Authenticate with GitHub Package Registry
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.NODE_AUTH_TOKEN_GITHUB }}" >> ~/.npmrc
run: echo "//npm.pkg.github.com/:_authToken=${{ inputs.node_auth_token_github }}" >> ~/.npmrc
shell: bash

- name: Install dependencies
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
uses: actions/checkout@v4

- uses: ./.github/workflows/init-npm
with:
node_auth_token_github: ${{ secrets.NODE_AUTH_TOKEN_GITHUB }}

- name: Build and upload to release
env:
Expand Down

0 comments on commit 770e70b

Please sign in to comment.