|
|
|
@ -10,6 +10,12 @@ on:
|
|
|
|
|
prev_tag: |
|
|
|
|
description: "Previous Tag" |
|
|
|
|
required: true |
|
|
|
|
tagHeadSHA: |
|
|
|
|
description: "Use HEAD SHA for tagging" |
|
|
|
|
required: true |
|
|
|
|
type: choice |
|
|
|
|
options: |
|
|
|
|
- "Y" |
|
|
|
|
# Triggered by release-nocodb.yml |
|
|
|
|
workflow_call: |
|
|
|
|
inputs: |
|
|
|
@ -21,6 +27,10 @@ on:
|
|
|
|
|
description: "Previous Tag" |
|
|
|
|
required: true |
|
|
|
|
type: string |
|
|
|
|
tagHeadSHA: |
|
|
|
|
description: "Use HEAD SHA for tagging" |
|
|
|
|
required: true |
|
|
|
|
type: string |
|
|
|
|
secrets: |
|
|
|
|
NC_GITHUB_TOKEN: |
|
|
|
|
required: true |
|
|
|
@ -40,11 +50,11 @@ jobs:
|
|
|
|
|
# else HEAD will be taken |
|
|
|
|
run: | |
|
|
|
|
TARGET_SHA=$(git rev-parse HEAD~2) |
|
|
|
|
if [[ ${{ github.event_name }} == 'workflow_dispatch' ]]; then |
|
|
|
|
if [[ ${{ github.event.inputs.tagHeadSHA || inputs.tagHeadSHA }} == "Y" ]]; then |
|
|
|
|
TARGET_SHA=$(git rev-parse HEAD) |
|
|
|
|
fi |
|
|
|
|
echo "::set-output name=TARGET_SHA::${TARGET_SHA}" |
|
|
|
|
echo "Setting TARGET_SHA: ${{steps.get-sha.outputs.TARGET_SHA}}" |
|
|
|
|
echo "Setting TARGET_SHA: ${TARGET_SHA}" |
|
|
|
|
- name: Create tag |
|
|
|
|
uses: actions/github-script@v3 |
|
|
|
|
with: |
|
|
|
|