Auto Tag #28
This file contains 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: Auto Tag | |
on: | |
schedule: | |
- cron: "1 12 * * 5" | |
jobs: | |
tag: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Determine tag | |
id: determine_tag | |
run: | | |
current_tag=$(git describe --tags --abbrev=0) | |
echo "tag=${current_tag%%-*}-$(date +%s)" >> $GITHUB_OUTPUT | |
- name: Push tag | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git tag ${{ steps.determine_tag.outputs.tag }} | |
git push origin ${{ steps.determine_tag.outputs.tag }} |