Skip to content

Commit

Permalink
Fix workflow input wiring for deprecate_release and `restore_releas…
Browse files Browse the repository at this point in the history
…e` workflows (#1311)
  • Loading branch information
edwardfoyle authored Apr 16, 2024
1 parent 65b516d commit 28a0a61
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/deprecate_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ jobs:
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# mapping the inputs to these environment variables allows the @actions/core toolkit to pick up the inputs
INPUT_DEPRECATIONMESSAGE: ${{ inputs.deprecationMessage }}
INPUT_USENPMREGISTRY: ${{ inputs.useNpmRegistry }}
INPUT_SEARCHFORRELEASESTARTINGFROM: ${{ inputs.searchForReleaseStartingFrom }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # version 3.6.0
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/restore_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ jobs:
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# mapping the inputs to these environment variables allows the @actions/core toolkit to pick up the inputs
INPUT_USENPMREGISTRY: ${{ inputs.useNpmRegistry }}
INPUT_SEARCHFORRELEASESTARTINGFROM: ${{ inputs.searchForReleaseStartingFrom }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # version 3.6.0
with:
Expand Down
3 changes: 2 additions & 1 deletion scripts/restore_release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import { DistTagMover } from './components/dist_tag_mover.js';
const searchForReleaseStartingFrom = getInput('searchForReleaseStartingFrom', {
required: true,
});
const useNpmRegistry = getInput('useNpmRegistry', { required: true });
const useNpmRegistry =
getInput('useNpmRegistry', { required: true }) === 'true';

if (useNpmRegistry) {
console.log(
Expand Down

0 comments on commit 28a0a61

Please sign in to comment.