mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Added support for latest
when creating release branches
- this should allow us to run the job without any manual effort, because it'll choose the latest tag for the patch release
This commit is contained in:
parent
cbccd400c6
commit
e80ab4fc46
1 changed files with 10 additions and 3 deletions
13
.github/workflows/create-release-branch.yml
vendored
13
.github/workflows/create-release-branch.yml
vendored
|
@ -3,11 +3,12 @@ on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
base-ref:
|
base-ref:
|
||||||
description: 'Git ref to base from'
|
description: 'Git ref to base from (defaults to latest tag)'
|
||||||
type: string
|
type: string
|
||||||
|
default: 'latest'
|
||||||
required: false
|
required: false
|
||||||
bump-type:
|
bump-type:
|
||||||
description: ''
|
description: 'Version bump type (patch, minor)'
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
default: 'patch'
|
default: 'patch'
|
||||||
|
@ -19,9 +20,15 @@ jobs:
|
||||||
create-branch:
|
create-branch:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- run: echo "BASE_REF=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
||||||
|
if: inputs.base-ref == 'latest'
|
||||||
|
|
||||||
|
- run: echo "BASE_REF=${{ inputs.base-ref }}" >> $GITHUB_ENV
|
||||||
|
if: inputs.base-ref != 'latest'
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
ref: ${{ inputs.base-ref }}
|
ref: ${{ env.BASE_REF }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue