Skip to content

Commit

Permalink
chore(ci): fix run on main (#545)
Browse files Browse the repository at this point in the history
Fix PR #542, build must run on main/pre-alfa branches

Signed-off-by: Nikita Korolev <[email protected]>
  • Loading branch information
universal-itengineer authored Nov 28, 2024
1 parent 741b303 commit 7ea5bae
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/dev_module_build-on-self-hosted-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,17 @@ jobs:
uses: actions/github-script@v7
with:
script: |
const prNumber = context.payload.pull_request.number;
const { data: labels } = await github.rest.issues.listLabelsOnIssue({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
});
return labels.map(label => label.name);
if (context.eventName === "pull_request" || context.eventName === "pull_request_target" ) {
const prNumber = context.payload.pull_request.number;
const { data: labels } = await github.rest.issues.listLabelsOnIssue({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
});
return labels.map(label => label.name);
} else {
return [];
}
result-encoding: string

- name: Set vars
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/dev_module_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,17 @@ jobs:
uses: actions/github-script@v7
with:
script: |
const prNumber = context.payload.pull_request.number;
const { data: labels } = await github.rest.issues.listLabelsOnIssue({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
});
return labels.map(label => label.name);
if (context.eventName === "pull_request" || context.eventName === "pull_request_target" ) {
const prNumber = context.payload.pull_request.number;
const { data: labels } = await github.rest.issues.listLabelsOnIssue({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
});
return labels.map(label => label.name);
} else {
return [];
}
result-encoding: string

- name: Set vars
Expand Down

0 comments on commit 7ea5bae

Please sign in to comment.