Skip to content

Commit 9a3d73c

Browse files
committed
ci: reset main to tag
1 parent 2e24c62 commit 9a3d73c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/updatemain.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: Fast-forward main branch to published release tag
1+
name: Reset main branch to published release tag
22

33
on:
44
workflow_dispatch:
55
release:
66
types: [published]
77

88
jobs:
9-
ff-main-to-release:
9+
reset-main-to-release:
1010
runs-on: ubuntu-latest
1111
permissions:
1212
contents: write
@@ -17,9 +17,9 @@ jobs:
1717
with:
1818
ref: main
1919

20-
- name: Fast-forward main to release tag
20+
- name: Reset main to release tag
2121
run: |
2222
tag="${{ github.event.release.tag_name }}"
2323
git fetch origin "refs/tags/$tag:refs/tags/$tag"
24-
git merge --ff-only "refs/tags/$tag"
25-
git push origin main
24+
git reset --hard "refs/tags/$tag"
25+
git push --force origin main

0 commit comments

Comments
 (0)