Skip to content

Commit

Permalink
actually just prevent pushes from pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
colemickens committed Jan 28, 2025
1 parent 1c145e9 commit ae22cbc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 19 deletions.
7 changes: 3 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99469,13 +99469,12 @@ var FlakeHubPushAction = class extends DetSysAction {
return env;
}
async pushFlakeToFlakeHub() {
const defaultBranchRef = `refs/heads/${github.context.payload.repository?.default_branch}`;
core.debug(
`actionsGithub.context.ref=='${github.context.ref}'`
);
core.debug(
`actionsGithub.context.payload.repository?.default_branch=='${github.context.payload.repository?.default_branch}'`
);
if (this.name === null && github.context.ref !== `refs/heads/${github.context.payload.repository?.default_branch}`) {
core.debug(`default_branch_ref=='${defaultBranchRef}'`);
if (this.name === null && github.context.ref !== defaultBranchRef) {
core.setFailed(
"flakehub-push can only be triggered from the repository's default branch"
);
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

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

Loading

0 comments on commit ae22cbc

Please sign in to comment.