fix: fix run build job

This commit is contained in:
Svyatoslav Shchipunov
2024-10-02 11:29:03 +07:00
parent 47c3466084
commit 66b6a8f7ce
2 changed files with 21 additions and 6 deletions

View File

@@ -1,13 +1,17 @@
name: Create Release on Tag
on:
release:
types:
- published
push:
tags:
- "v*.*.*"
workflow_call:
inputs:
tag_name:
required: true
type: string
jobs:
generate-config:
if: github.event.release.tag_name =~ '^v[0-9]+\.[0-9]+\.[0-9]+$' # Условие для проверки формата тега
runs-on: ubuntu-latest
outputs:
job-config: ${{ steps.generate-config.outputs.job-config }}
@@ -22,7 +26,12 @@ jobs:
- name: Get OpenWRT version from tag
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
run: |
if [ "${{ github.event_name }}" == "workflow_call" ]; then
echo "VERSION=${{ inputs.tag_name/v/}}" >> $GITHUB_ENV
else
echo "VERSION=${GITHUB_REF/refs/tags/v/}" >> $GITHUB_ENV
fi
- name: Install dependencies
run: npm install