Fix precommit

This commit is contained in:
Aaron Dalton 2024-01-19 07:48:19 -08:00 committed by Aaron Dalton
parent db1d8e61d1
commit 77ee3d72ec

View File

@ -28,26 +28,24 @@ jobs:
r=%(refname) r=%(refname)
echo ${r#refs/tags/} echo ${r#refs/tags/}
' '
echo 'NEW_TAGS<<EOF' >> $GITHUB_OUTPUT echo 'NEW_TAGS<<EOF' >> $GITHUB_OUTPUT
$(eval `git for-each-ref --format=$fmt --no-merge upstream refs/tags`) >> $GITHUB_OUTPUT $(eval `git for-each-ref --format=$fmt --no-merge upstream refs/tags`) >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT echo 'EOF' >> $GITHUB_OUTPUT
- name: Set Identity - name: Set Identity
run: | run: |
git config user.name "Github Action" git config user.name "Github Action"
git config user.email "bot@github-actions" git config user.email "bot@github-actions"
- name: Create Tags - name: Create Tags
if: ${{inputs.tags || steps.fetch-upstream-tags.outputs.NEW_TAGS}} if: ${{inputs.tags || steps.fetch-upstream-tags.outputs.NEW_TAGS}}
run: | run: |
for TAG in ${NEW_TAGS}; do for TAG in ${NEW_TAGS}; do
git checkout -b release/${TAG} ${TAG} git checkout -b release/${TAG} ${TAG}
git rev-list --no-merges --reverse main ^upstream | git cherry-pick --stdin git rev-list --no-merges --reverse main ^upstream | git cherry-pick --stdin
git tag -d ${TAG} git tag -d ${TAG}
git tag ${TAG} release/${TAG} git tag ${TAG} release/${TAG}
done done
for TAG in ${NEW_TAGS}; do git push -u origin release/${TAG}; done for TAG in ${NEW_TAGS}; do git push -u origin release/${TAG}; done
env: env:
NEW_TAGS: ${{inputs.tags || steps.fetch-upstream-tags.outputs.NEW_TAGS}} NEW_TAGS: ${{inputs.tags || steps.fetch-upstream-tags.outputs.NEW_TAGS}}
env: env:
GH_TOKEN: ${{ github.token }} GH_TOKEN: ${{ github.token }}