forked fromknik0/faac
- Notifications
You must be signed in to change notification settings - Fork0
Rename tags to a better name#47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
name:Rename tags to a better name | |
on: | |
push: | |
branches: | |
-'lfs/action' | |
schedule: | |
-cron:"0 1,13 * * *" | |
workflow_dispatch: | |
jobs: | |
retag: | |
runs-on:ubuntu-latest | |
steps: | |
-uses:actions/checkout@v4 | |
with: | |
ref:master | |
fetch-depth:0 | |
token:${{ secrets.GH_PAT }} | |
-name:Rename tags | |
run:| | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git fetch --tags https://github.com/knik0/faac | |
for bad_name in $(git tag | grep ^faac-); do | |
good_name=v${bad_name#faac-} | |
if ! git tag | grep -q $good_name; then | |
git tag $good_name $bad_name | |
fi | |
done | |
git push --tags |