Skip to content

Commit

Permalink
Merge pull request #195 from ZettaScaleLabs/fix-tag-delete-fail
Browse files Browse the repository at this point in the history
fix: don't fail workflow if tag delete fails
  • Loading branch information
gabrik authored Jun 27, 2024
2 parents eaf97ed + 3f81270 commit 0d6c6aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dist/create-release-branch-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -24883,7 +24883,8 @@ async function main(input) {
toDelete.forEach(branch => {
const tag = branch.replace("release/dry-run/", "");
command_sh(`git push origin --delete ${branch}`, { cwd: repo });
command_sh(`git push origin --delete ${tag}`, { cwd: repo });
// Don't fail the entire workflow if the tag delete fails
command_sh(`git push origin --delete ${tag}`, { cwd: repo, check: false });
});
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/create-release-branch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ export async function main(input: Input) {
toDelete.forEach(branch => {
const tag = branch.replace("release/dry-run/", "");
sh(`git push origin --delete ${branch}`, { cwd: repo });
sh(`git push origin --delete ${tag}`, { cwd: repo });
// Don't fail the entire workflow if the tag delete fails
sh(`git push origin --delete ${tag}`, { cwd: repo, check: false });
});
}
}
Expand Down

0 comments on commit 0d6c6aa

Please sign in to comment.