Browse Source

fix: tagging on wrong SHA in release

pull/2378/head
Wing-Kam Wong 2 years ago
parent
commit
8c0a5e6fb2
  1. 14
      .github/workflows/release-draft.yml
  2. 1
      .github/workflows/release-nocodb.yml

14
.github/workflows/release-draft.yml

@ -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:

1
.github/workflows/release-nocodb.yml

@ -78,6 +78,7 @@ jobs:
with:
tag: ${{ needs.process-input.outputs.target_tag }}
prev_tag: ${{ needs.process-input.outputs.prev_tag }}
tagHeadSHA: 'N'
secrets:
NC_GITHUB_TOKEN: "${{ secrets.NC_GITHUB_TOKEN }}"

Loading…
Cancel
Save