Sync Gloo Mesh APIs. Destination Branch: gloo-mesh-v2.7.x #954
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: Tag Commit on LTS Branch | |
on: | |
push: | |
branches: | |
- 'gloo-mesh-v**.**.x' | |
jobs: | |
tag-version: | |
runs-on: ubuntu-22.04 | |
env: | |
# The regex of a commit produced by the soloio-bot | |
COMMIT_REGEX: "^.*(Sync Gloo Mesh APIs.)+.*$" | |
steps: | |
- name: Cancel Previous Actions | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- name: Parse out tag name from commit message | |
id: tag_version | |
run: | | |
if [[ $(git log -1 --oneline) =~ ${{ env.COMMIT_REGEX }} ]]; then | |
TAG_NAME=$(git log -1 --oneline | awk -F'@tag-name=' '{print $2}' | awk -F' ' '{print $1}') | |
fi | |
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT | |
- name: Bump version and push tag | |
if: steps.tag_version.outputs.tag_name != '' | |
uses: anothrNick/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CUSTOM_TAG: ${{ steps.tag_version.outputs.tag_name }} | |
RELEASE_BRANCHES: 'gloo-mesh-v[0-9]+\.[0-9]+\.x$' |