Skip to content

add maven ; [tag/2.319.1] #12

add maven ; [tag/2.319.1]

add maven ; [tag/2.319.1] #12

Workflow file for this run

# Copyright (c) 2024 MobileCoin Inc.
name: tag
on:
push:
branches:
- main
# when the gh publishes a new ghcr.io/actions/actions-runner image renovate should PR and add in a message like `[tag/2.310.0]`
# capture this output and tag the repo triggering the other build actions.
jobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_PAT }}
- env:
MESSAGE: ${{ github.event.head_commit.message }}
shell: bash
run: |
# look for sting like "[tag/v2.312.0]" in commit message.
regex=".*\[tag/(.*)\].*"
if [[ "${MESSAGE}" =~ $regex ]]
then
tag="${BASH_REMATCH[1]}"
# remove v prefix if it exists.
tag="${tag/#v/}"
echo "Found tag: ${tag}"
git tag --force "${tag}"
git push --tags --force
else
echo "Could not find tag in commit message"
echo "${MESSAGE}"
exit 0
fi