Skip to content

Commit e1bdba1

Browse files
committed
fix: handle 404 when tag ref does not exist yet
1 parent 830631e commit e1bdba1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/scripts/update-major-tag.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default async function updateMajorTag({ github, context }) {
2929
});
3030
console.log(`Updated ${ref} to ${sha}`);
3131
} catch (error) {
32-
if (error.status === 422) {
32+
if (error?.status === 404 || error?.status === 422) {
3333
await github.rest.git.createRef({
3434
owner: context.repo.owner,
3535
repo: context.repo.repo,

0 commit comments

Comments
 (0)