mirror of
https://github.com/Slava-Shchipunov/awg-openwrt.git
synced 2026-03-20 20:05:49 +00:00
Compare commits
24 Commits
feat/updat
...
fix/fix-re
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
727d873870 | ||
|
|
2d0ce4148d | ||
|
|
f4361730a1 | ||
|
|
37f4fc71e2 | ||
|
|
4dc8ea2b6a | ||
|
|
e5696ca1e3 | ||
|
|
aec74cab7d | ||
|
|
77e16b164c | ||
|
|
9c44a73425 | ||
|
|
cd0e27204e | ||
|
|
811154ea36 | ||
|
|
66b6a8f7ce | ||
|
|
47c3466084 | ||
|
|
77ee2bf7cc | ||
|
|
fa7bf7cfb0 | ||
|
|
8c467935c4 | ||
|
|
96b8dddbd1 | ||
|
|
128a6054c2 | ||
|
|
d0727b534e | ||
|
|
e55641a754 | ||
|
|
e7c7d2d8a7 | ||
|
|
1b130609a3 | ||
|
|
78ee14fbf2 | ||
|
|
14397a5914 |
15
.github/workflows/build-module.yml
vendored
15
.github/workflows/build-module.yml
vendored
@@ -1,9 +1,14 @@
|
|||||||
name: Create Release on Tag
|
name: Create Release on Tag
|
||||||
# on: [workflow_dispatch]
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- "v*.*.*"
|
- "v*.*.*"
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
tag_name:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
generate-config:
|
generate-config:
|
||||||
@@ -21,7 +26,13 @@ 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 }}" >> $GITHUB_ENV
|
||||||
|
echo "VERSION=${VERSION#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
|
||||||
|
|||||||
40
.github/workflows/run-release.yml
vendored
40
.github/workflows/run-release.yml
vendored
@@ -8,6 +8,9 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
sync-releases:
|
sync-releases:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
release_exists: ${{ steps.check_release.outputs.release_exists }}
|
||||||
|
release_tag: ${{ steps.get_release.outputs.release_tag }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout your repo
|
- name: Checkout your repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -24,25 +27,40 @@ jobs:
|
|||||||
- name: Check if release exists in your repo
|
- name: Check if release exists in your repo
|
||||||
id: check_release
|
id: check_release
|
||||||
run: |
|
run: |
|
||||||
curl -s https://api.github.com/repos/Slava-Shchipunov/awg-openwrt/releases/tags/${{ steps.get_release.outputs.release_tag }} | jq -r .tag_name || echo "Not found"
|
RELEASE_EXISTS=$(curl -s https://api.github.com/repos/Slava-Shchipunov/awg-openwrt/releases/tags/${{ steps.get_release.outputs.release_tag }} | jq -r .tag_name)
|
||||||
|
if [ "$RELEASE_EXISTS" == "null" ]; then
|
||||||
|
echo "::set-output name=release_exists::false"
|
||||||
|
else
|
||||||
|
echo "::set-output name=release_exists::true"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Create release in your repo
|
- name: Create release in your repo
|
||||||
if: steps.check_release.outputs.tag_name == 'Not found'
|
if: steps.check_release.outputs.release_exists == 'false'
|
||||||
run: |
|
run: |
|
||||||
ART="
|
ART="
|
||||||
|
\`\`\`
|
||||||
_______ ________ __
|
_______ ________ __
|
||||||
| |.-----.-----.-----.| | | |.----.| |_
|
| |.-----.-----.-----.| | | |.----.| |_
|
||||||
| - || _ | -__| || | | || _|| _|
|
| - || _ | -__| || | | || _|| _|
|
||||||
|_______|| __|_____|__|__||________||__| |____|
|
|_______|| __|_____|__|__||________||__| |____|
|
||||||
|__| A M N E Z I A W I R E G U A R D
|
|__| A M N E Z I A W I R E G U A R D
|
||||||
-----------------------------------------------------
|
-----------------------------------------------------
|
||||||
OpenWrt ${{ steps.get_release.outputs.release_tag }}
|
OpenWrt ${{ steps.get_release.outputs.release_tag }}
|
||||||
-----------------------------------------------------"
|
-----------------------------------------------------
|
||||||
|
\`\`\`"
|
||||||
|
|
||||||
curl -X POST https://api.github.com/repos/Slava-Shchipunov/awg-openwrt/releases \
|
curl -X POST https://api.github.com/repos/Slava-Shchipunov/awg-openwrt/releases \
|
||||||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{
|
-d "$(jq -n --arg tag "${{ steps.get_release.outputs.release_tag }}" \
|
||||||
"tag_name": "'${{ steps.get_release.outputs.release_tag }}'",
|
--arg name "Build amnezia wg for all devices with openwrt ${{ steps.get_release.outputs.release_tag }}" \
|
||||||
"name": "Build amnezia wg for all devices with openwrt '${{ steps.get_release.outputs.release_tag }}'",
|
--arg body "$ART" \
|
||||||
"body": "'"${ART}"'\n\nAutomatically created release for OpenWRT '${{ steps.get_release.outputs.release_tag }}'."
|
'{ tag_name: $tag, name: $name, body: $body }')"
|
||||||
}'
|
|
||||||
|
run-build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: sync-releases
|
||||||
|
if: needs.sync-releases.outputs.release_exists == 'false'
|
||||||
|
uses: Slava-Shchipunov/awg-openwrt/.github/workflows/build-module.yml@master
|
||||||
|
with:
|
||||||
|
tag_name: ${{ needs.sync-releases.outputs.release_tag }}
|
||||||
Reference in New Issue
Block a user