Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/workflows/tag-github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ name: Tag GitHub

on:
workflow_call:
inputs:
add_v:
description: "Whether to add a v prefix to the version tag"
type: boolean
required: false
default: false
outputs:
changed:
description: "Whether the VERSION file changed"
Expand Down Expand Up @@ -44,6 +50,9 @@ jobs:
validate="^[0-9]+\.[0-9]+\.[0-9]+$"
if [[ $version =~ $validate ]]; then
echo "changed=true" >> $GITHUB_OUTPUT
if [[ "${{ inputs.add_v }}" == "true" ]]; then
version="v${version}"
fi
echo "version=$version" >> $GITHUB_OUTPUT
else
echo "Version change not for release"
Expand All @@ -53,6 +62,6 @@ jobs:
if: steps.version-change.outputs.changed == 'true'
uses: onosproject/.github/.github/actions/create-github-release-action@main
with:
version: ${{ steps.version-change.outputs.version }}
VERSION: ${{ steps.version-change.outputs.version }}
env:
GH_TOKEN: ${{ secrets.GH_ONOS_PAT }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}