Skip to content

Bump org.springframework.boot:spring-boot-starter-parent from 3.5.6 to 4.0.0 in /server #15

Bump org.springframework.boot:spring-boot-starter-parent from 3.5.6 to 4.0.0 in /server

Bump org.springframework.boot:spring-boot-starter-parent from 3.5.6 to 4.0.0 in /server #15

Workflow file for this run

name: 'create tag on release prepare PR merge'
on:
pull_request:
types: [closed]
branches:
- main
jobs:
tagging:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
steps:
- name: extract tag name from branch
id: tag_extraction
shell: bash
run: |
set -euo pipefail
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
if [[ "$BRANCH_NAME" =~ ^prepare-v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
VERSION_TAG="${BRANCH_NAME#prepare-}"
echo "version_tag=$VERSION_TAG" >> "$GITHUB_OUTPUT"
echo "extracted tag: $VERSION_TAG"
else
echo "Branch '$BRANCH_NAME' does not match 'prepare-vX.Y.Z'; skipping."
echo "version_tag=" >> "$GITHUB_OUTPUT"
fi
- name: Create and Push Tag
if: steps.tag_extraction.outputs.version_tag != ''
env:
TAG_NAME: ${{ steps.tag_extraction.outputs.version_tag }}
uses: actions/github-script@v6
with:
script: |
const owner = context.repo.owner;
const repo = context.repo.repo;
const pr = context.payload.pull_request;
const tag = process.env.TAG_NAME;
const targetSha = pr.merge_commit_sha;
console.log(`Creating tag ${tag}`);
await github.rest.git.createRef({
owner: owner,
repo: repo,
ref: `refs/tags/${tag}`,
sha: targetSha
});
console.log(`Successfully created tag ${tag}`);