24 Commits

Author SHA1 Message Date
Svyatoslav Shchipunov
727d873870 fix: fix run build job 2024-10-07 18:15:24 +07:00
Svyatoslav Shchipunov
2d0ce4148d fix: fix run build job 2024-10-07 18:09:42 +07:00
Svyatoslav Shchipunov
f4361730a1 fix: fix run build job 2024-10-02 13:10:47 +07:00
Svyatoslav Shchipunov
37f4fc71e2 fix: fix run build job 2024-10-02 13:01:50 +07:00
Svyatoslav Shchipunov
4dc8ea2b6a fix: fix run build job 2024-10-02 12:56:58 +07:00
Svyatoslav Shchipunov
e5696ca1e3 fix: fix run build job 2024-10-02 12:20:52 +07:00
Svyatoslav Shchipunov
aec74cab7d fix: fix run build job 2024-10-02 12:14:53 +07:00
Svyatoslav Shchipunov
77e16b164c fix: fix run build job 2024-10-02 12:11:12 +07:00
Svyatoslav Shchipunov
9c44a73425 fix: fix run build job 2024-10-02 12:06:38 +07:00
Svyatoslav Shchipunov
cd0e27204e fix: fix uses attribute 2024-10-02 11:45:42 +07:00
Svyatoslav Shchipunov
811154ea36 fix: fix uses attribute 2024-10-02 11:33:53 +07:00
Svyatoslav Shchipunov
66b6a8f7ce fix: fix run build job 2024-10-02 11:29:03 +07:00
Svyatoslav Shchipunov
47c3466084 fix: fix release art 2024-10-02 10:58:02 +07:00
Svyatoslav Shchipunov
77ee2bf7cc fix: fix build run conditions 2024-10-02 10:52:39 +07:00
Svyatoslav Shchipunov
fa7bf7cfb0 Revert "fix: fix JSON parsing"
This reverts commit 8c467935c4.
2024-10-02 10:32:43 +07:00
Svyatoslav Shchipunov
8c467935c4 fix: fix JSON parsing 2024-10-02 10:29:11 +07:00
Svyatoslav Shchipunov
96b8dddbd1 fix: fix JSON parsing 2024-10-02 10:18:53 +07:00
Svyatoslav Shchipunov
128a6054c2 fix: add job output 2024-10-02 10:13:56 +07:00
Svyatoslav Shchipunov
d0727b534e fix: fix job run condition 2024-10-02 10:02:44 +07:00
Slava-Shchipunov
e55641a754 Merge pull request #12 from Slava-Shchipunov/feat/update-gh-actions
feat: add target filter to snapshots
2024-09-23 10:36:19 +07:00
Slava-Shchipunov
e7c7d2d8a7 Merge pull request #11 from Slava-Shchipunov/feat/update-gh-actions
docs: update README
2024-09-20 17:34:45 +07:00
Slava-Shchipunov
1b130609a3 Merge pull request #10 from Slava-Shchipunov/feat/update-gh-actions
feat: add x86 generic
2024-09-20 15:27:09 +07:00
Slava-Shchipunov
78ee14fbf2 Merge pull request #9 from Slava-Shchipunov/feat/update-gh-actions
fix: fix art
2024-09-20 12:13:33 +07:00
Slava-Shchipunov
14397a5914 Merge pull request #8 from Slava-Shchipunov/feat/update-gh-actions
Feat/update gh actions
2024-09-20 11:42:59 +07:00
2 changed files with 42 additions and 13 deletions

View File

@@ -1,9 +1,14 @@
name: Create Release on Tag
# on: [workflow_dispatch]
on:
push:
tags:
- "v*.*.*"
workflow_call:
inputs:
tag_name:
required: true
type: string
jobs:
generate-config:
@@ -21,7 +26,13 @@ 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 }}" >> $GITHUB_ENV
echo "VERSION=${VERSION#v}" >> $GITHUB_ENV
else
echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
fi
- name: Install dependencies
run: npm install

View File

@@ -8,6 +8,9 @@ on:
jobs:
sync-releases:
runs-on: ubuntu-latest
outputs:
release_exists: ${{ steps.check_release.outputs.release_exists }}
release_tag: ${{ steps.get_release.outputs.release_tag }}
steps:
- name: Checkout your repo
uses: actions/checkout@v4
@@ -24,25 +27,40 @@ jobs:
- name: Check if release exists in your repo
id: check_release
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
if: steps.check_release.outputs.tag_name == 'Not found'
if: steps.check_release.outputs.release_exists == 'false'
run: |
ART="
\`\`\`
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| A M N E Z I A W I R E G U A R D
-----------------------------------------------------
OpenWrt ${{ steps.get_release.outputs.release_tag }}
-----------------------------------------------------"
-----------------------------------------------------
\`\`\`"
curl -X POST https://api.github.com/repos/Slava-Shchipunov/awg-openwrt/releases \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/json" \
-d '{
"tag_name": "'${{ steps.get_release.outputs.release_tag }}'",
"name": "Build amnezia wg for all devices with openwrt '${{ steps.get_release.outputs.release_tag }}'",
"body": "'"${ART}"'\n\nAutomatically created release for OpenWRT '${{ 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 body "$ART" \
'{ 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 }}