mirror of
https://github.com/Slava-Shchipunov/awg-openwrt.git
synced 2026-03-14 01:13:09 +00:00
fix: fix run build job
This commit is contained in:
19
.github/workflows/build-module.yml
vendored
19
.github/workflows/build-module.yml
vendored
@@ -1,13 +1,17 @@
|
|||||||
name: Create Release on Tag
|
name: Create Release on Tag
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
push:
|
||||||
types:
|
tags:
|
||||||
- published
|
- "v*.*.*"
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
tag_name:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
generate-config:
|
generate-config:
|
||||||
if: github.event.release.tag_name =~ '^v[0-9]+\.[0-9]+\.[0-9]+$' # Условие для проверки формата тега
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
job-config: ${{ steps.generate-config.outputs.job-config }}
|
job-config: ${{ steps.generate-config.outputs.job-config }}
|
||||||
@@ -22,7 +26,12 @@ jobs:
|
|||||||
|
|
||||||
- name: Get OpenWRT version from tag
|
- name: Get OpenWRT version from tag
|
||||||
id: get_version
|
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
|
- name: Install dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|||||||
8
.github/workflows/run-release.yml
vendored
8
.github/workflows/run-release.yml
vendored
@@ -52,4 +52,10 @@ jobs:
|
|||||||
-d "$(jq -n --arg tag "${{ steps.get_release.outputs.release_tag }}" \
|
-d "$(jq -n --arg tag "${{ steps.get_release.outputs.release_tag }}" \
|
||||||
--arg name "Build amnezia wg for all devices with openwrt ${{ steps.get_release.outputs.release_tag }}" \
|
--arg name "Build amnezia wg for all devices with openwrt ${{ steps.get_release.outputs.release_tag }}" \
|
||||||
--arg body "$ART" \
|
--arg body "$ART" \
|
||||||
'{ tag_name: $tag, name: $name, body: $body }')"
|
'{ tag_name: $tag, name: $name, body: $body }')"
|
||||||
|
|
||||||
|
- name: Run build job
|
||||||
|
if: steps.check_release.outputs.release_exists == 'false'
|
||||||
|
uses: .github/workflows/build-module.yml
|
||||||
|
with:
|
||||||
|
tag_name: ${{ steps.get_release.outputs.release_tag }}
|
||||||
Reference in New Issue
Block a user