generated from actions/typescript-action
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: delete keep-latest * ci: delete deployments on main
- Loading branch information
1 parent
64f4736
commit 1c3239a
Showing
10 changed files
with
72 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"github-actions-cloudflare-pages": minor | ||
--- | ||
|
||
feat: delete workflow keep-latest number of deployments. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import {getInput} from '@actions/core' | ||
|
||
import {INPUT_KEYS_KEEP_LATEST} from '@/input-keys' | ||
|
||
export interface Inputs { | ||
/** How many deployments to keep. */ | ||
keepLatest: number | ||
} | ||
|
||
const getInputs = (): Inputs => { | ||
return { | ||
keepLatest: Number( | ||
getInput(INPUT_KEYS_KEEP_LATEST, {required: false, trimWhitespace: true}) | ||
) | ||
} | ||
} | ||
|
||
type UseInputs = ReturnType<typeof getInputs> | ||
|
||
let _inputs: UseInputs | ||
|
||
export const useInputs = (): UseInputs => { | ||
return process.env.NODE_ENV === 'test' | ||
? getInputs() | ||
: _inputs ?? (_inputs = getInputs()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters