Skip to content

Commit 412aeb8

Browse files
committed
Build actions
1 parent 5206251 commit 412aeb8

File tree

5 files changed

+45
-16
lines changed

5 files changed

+45
-16
lines changed

actions/copy-demos/dist/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2049,7 +2049,7 @@ function read_demos_from_json(json_path) {
20492049
async function run() {
20502050
const gradio_version = coreExports.getInput("gradio_version");
20512051
const gradio_client_version = coreExports.getInput("gradio_client_version");
2052-
const config_path = coreExports.getInput("config_path") || path.join(__dirname, ".config", "demos.json");
2052+
const config_path = coreExports.getInput("config_path") || path.join(root, ".config", "demos.json");
20532053
if (!gradio_version || !gradio_client_version) {
20542054
console.error(
20552055
"Usage: node script.js <gradio_version> <gradio_client_version> [config_path]"
@@ -2072,6 +2072,7 @@ ${gradio_client_version}
20722072
${gradio_version}
20732073
pypistats==1.1.0
20742074
plotly
2075+
matplotlib
20752076
altair
20762077
vega_datasets
20772078
`.trim();

actions/filter-paths/dist/index.js

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86782,6 +86782,7 @@ function match_filter(patterns, files) {
8678286782
}
8678386783
async function run() {
8678486784
var _a;
86785+
console.log(JSON.stringify(context, null, 2));
8678586786
const filter_name = coreExports.getInput("filter");
8678686787
const path = coreExports.getInput("path") || ".github/filters.json";
8678786788
const token = coreExports.getInput("token");
@@ -86794,16 +86795,27 @@ async function run() {
8679486795
}
8679586796
const filter = filters[filter_name];
8679686797
let files = [];
86797-
for await (const response of octokit.paginate.iterator(
86798-
octokit.rest.pulls.listFiles,
86799-
{
86798+
if (context.eventName === "pull_request") {
86799+
for await (const response of octokit.paginate.iterator(
86800+
octokit.rest.pulls.listFiles,
86801+
{
86802+
owner: context.repo.owner,
86803+
repo: context.repo.repo,
86804+
pull_number: (_a = context.payload.pull_request) == null ? void 0 : _a.number,
86805+
per_page: 100
86806+
}
86807+
)) {
86808+
files = [...files, ...parse_data(response.data)];
86809+
}
86810+
} else if (context.eventName === "push" || context.eventName === "workflow_dispatch") {
86811+
const response = await octokit.rest.repos.getCommit({
8680086812
owner: context.repo.owner,
8680186813
repo: context.repo.repo,
86802-
pull_number: (_a = context.payload.pull_request) == null ? void 0 : _a.number,
86803-
per_page: 100
86804-
}
86805-
)) {
86806-
files = [...files, ...parse_data(response.data)];
86814+
ref: context.ref
86815+
});
86816+
files = [...files, ...parse_data(response.data.files)];
86817+
} else {
86818+
throw new Error("Unsupported event");
8680786819
}
8680886820
files = files.map((f) => f.filename);
8680986821
const result = match_filter(filter, files);

actions/find-pr/dist/index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85283,7 +85283,7 @@ function getOctokit(token, options, ...additionalPlugins) {
8528385283
}
8528485284
getOctokit_1 = github.getOctokit = getOctokit;
8528585285
async function run() {
85286-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
85286+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
8528785287
const octokit = getOctokit_1(coreExports.getInput("github_token"));
8528885288
const { repo, owner } = context.repo;
8528985289
const outputs = {
@@ -85294,7 +85294,8 @@ async function run() {
8529485294
mergeable: false,
8529585295
merge_sha: false,
8529685296
found_pr: false,
85297-
labels: []
85297+
labels: [],
85298+
actor: false
8529885299
};
8529985300
const open_pull_requests = await get_prs(octokit, repo, owner);
8530085301
if (context.eventName === "push") {
@@ -85395,6 +85396,7 @@ async function run() {
8539585396
merge_sha,
8539685397
labels
8539785398
} = get_pr_details_from_title(open_pull_requests, title);
85399+
console.log(JSON.stringify(context, null, 2));
8539885400
outputs.source_repo = source_repo || false;
8539985401
outputs.source_branch = source_branch || false;
8540085402
outputs.pr_number = pr_number ?? false;
@@ -85403,7 +85405,8 @@ async function run() {
8540385405
outputs.mergeable = mergeable === "MERGEABLE" ? true : false;
8540485406
outputs.merge_sha = merge_sha || sha || false;
8540585407
outputs.labels = labels;
85406-
} else if ((_t = (_s = context.payload) == null ? void 0 : _s.workflow_run) == null ? void 0 : _t.event) {
85408+
outputs.actor = ((_t = (_s = context.payload.workflow_run) == null ? void 0 : _s.actor) == null ? void 0 : _t.login) || false;
85409+
} else if ((_v = (_u = context.payload) == null ? void 0 : _u.workflow_run) == null ? void 0 : _v.event) {
8540785410
coreExports.setFailed(
8540885411
"This action can only be run on pull_request, push, or issue_comment events or workflow_run events triggered from those events."
8540985412
);

actions/publish-pypi/dist/index.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34623,7 +34623,7 @@ const runtime_prerequisites_txt = [
3462334623
`pip-with-requires-python==1.0.1
3462434624

3462534625
# The following packages are considered to be unsafe in a requirements file:
34626-
pip==22.3.1`
34626+
pip>=23.3.1`
3462734627
];
3462834628
const runtime_in = [
3462934629
"runtime.in",
@@ -34672,7 +34672,7 @@ keyring==23.11.0
3467234672
# via twine
3467334673
more-itertools==9.0.0
3467434674
# via jaraco-classes
34675-
pkginfo==1.10.0
34675+
pkginfo==1.12.0
3467634676
# via
3467734677
# -r runtime.in
3467834678
# twine
@@ -34767,7 +34767,17 @@ async function run() {
3476734767
"pip",
3476834768
[
3476934769
"install",
34770-
"twine==4",
34770+
"--user",
34771+
"--upgrade",
34772+
"--no-cache-dir",
34773+
"pip>=23.3.1"
34774+
]
34775+
);
34776+
await exec_2(
34777+
"pip",
34778+
[
34779+
"install",
34780+
"twine==6",
3477134781
"--user",
3477234782
"--upgrade",
3477334783
"--no-cache-dir",

actions/set-commit-status/dist/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85295,7 +85295,7 @@ async function run() {
8529585295
run_id: parseInt(run_id)
8529685296
});
8529785297
const message = "Skipped — No changes detected";
85298-
octokit.rest.repos.createCommitStatus({
85298+
const res = await octokit.rest.repos.createCommitStatus({
8529985299
owner: context.repo.owner,
8530085300
repo: context.repo.repo,
8530185301
sha,
@@ -85304,5 +85304,8 @@ async function run() {
8530485304
context: name,
8530585305
target_url: url || workflow_run.data.html_url
8530685306
});
85307+
console.log({ sha, name, url });
85308+
console.log(JSON.stringify(workflow_run, null, 2));
85309+
console.log(JSON.stringify(res, null, 2));
8530785310
}
8530885311
run();

0 commit comments

Comments
 (0)