forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/Expensify/App into feat/#Ex…
…pensify#23229-linking
- Loading branch information
Showing
674 changed files
with
34,618 additions
and
8,494 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Get artifact info | ||
description: Gets the ID and workflow ID about a specific artifact. By default artifacts are only available in the same workflow. This action can be used to get the information needed to download an artifact from a different workflow. | ||
|
||
inputs: | ||
GITHUB_TOKEN: | ||
description: Auth token for New Expensify Github; necessary for accessing Octokit. | ||
required: true | ||
ARTIFACT_NAME: | ||
description: Name of the artifact to get infos about (e.g. to use for downloading that artifact) | ||
required: true | ||
|
||
outputs: | ||
ARTIFACT_FOUND: | ||
description: Whether the artifact was found | ||
ARTIFACT_ID: | ||
description: The ID of the artifact | ||
ARTIFACT_WORKFLOW_ID: | ||
description: The ID of the workflow that produced the artifact | ||
|
||
runs: | ||
using: "node20" | ||
main: "index.js" |
31 changes: 31 additions & 0 deletions
31
.github/actions/javascript/getArtifactInfo/getArtifactInfo.js
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,31 @@ | ||
const _ = require('underscore'); | ||
const core = require('@actions/core'); | ||
const GithubUtils = require('../../../libs/GithubUtils'); | ||
|
||
const run = function () { | ||
const artifactName = core.getInput('ARTIFACT_NAME', {required: true}); | ||
|
||
return GithubUtils.getArtifactByName(artifactName) | ||
.then((artifact) => { | ||
if (_.isUndefined(artifact)) { | ||
console.log(`No artifact found with the name ${artifactName}`); | ||
core.setOutput('ARTIFACT_FOUND', false); | ||
return; | ||
} | ||
|
||
console.log('Artifact info', artifact); | ||
core.setOutput('ARTIFACT_FOUND', true); | ||
core.setOutput('ARTIFACT_ID', artifact.id); | ||
core.setOutput('ARTIFACT_WORKFLOW_ID', artifact.workflow_run.id); | ||
}) | ||
.catch((error) => { | ||
console.error('A problem occurred while trying to communicate with the GitHub API', error); | ||
core.setFailed(error); | ||
}); | ||
}; | ||
|
||
if (require.main === module) { | ||
run(); | ||
} | ||
|
||
module.exports = run; |
Oops, something went wrong.