Skip to content

Commit

Permalink
fix: fixed input
Browse files Browse the repository at this point in the history
  • Loading branch information
saurav0705 committed Mar 24, 2024
1 parent b76a376 commit 2820027
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,6 @@ The GitHub token used to authenticate API requests. You can use the `{{ secrets.
- Description: This setting defines the pattern against which checks will be applied.
- Value: `/file/pattern` represents the picomatch expression pattern used for matching.

### `ARTIFACT_RETENTION_DAYS`

This is used to set artifact retention days while logging a successful run and will be consumed when `UPLOAD_KEYS` is given.

## Outputs

This Return a `status` object in which the following are present
Expand Down
9 changes: 6 additions & 3 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,17 @@ import {getConfig} from './get-config'
import {getUploadConfig} from './get-upload-config'

const uploadFlow = async (input: string) => {
startGroup(`Starting Upload Flow...`)
info(`GITHUB CONFIG => ${JSON.stringify(github.CONFIG, null, 2)}`)
const {key, retentionDays} = getUploadConfig(input)
await artifact.uploadArtifact(key, github.CONFIG.sha, retentionDays)
endGroup()
return
}

const checkFlow = async (config: string) => {
startGroup(`Started Check Flow...`)
info(`GITHUB CONFIG => ${JSON.stringify(github.CONFIG, null, 2)}`)
const setOutputResponse = (response: ArtifactFinalResponseStatus[]): void => {
for (const resp of response) {
setOutput(resp.suppliedKey, resp)
Expand Down Expand Up @@ -94,11 +99,7 @@ async function run(): Promise<void> {
sha: context.payload.pull_request?.head.sha ?? ''
})

startGroup(`Initiating configs for github and input...`)

info(`GITHUB CONFIG => ${JSON.stringify(github.CONFIG, null, 2)}`)

if (UPLOAD) {
if (UPLOAD?.length) {
await uploadFlow(UPLOAD)
return
}
Expand Down

0 comments on commit 2820027

Please sign in to comment.