mirror of
https://github.com/Slava-Shchipunov/awg-openwrt.git
synced 2026-03-14 01:13:09 +00:00
Compare commits
50 Commits
fix/fix-au
...
v23.05.5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2de5a7406e | ||
|
|
727d873870 | ||
|
|
e538a4cd3b | ||
|
|
2d0ce4148d | ||
|
|
bdcc13cb62 | ||
|
|
f4361730a1 | ||
|
|
bde01b77c4 | ||
|
|
37f4fc71e2 | ||
|
|
12ffd61390 | ||
|
|
4dc8ea2b6a | ||
|
|
4add339eba | ||
|
|
e5696ca1e3 | ||
|
|
90508ad0b1 | ||
|
|
aec74cab7d | ||
|
|
9ae861fe88 | ||
|
|
77e16b164c | ||
|
|
0ac5434a63 | ||
|
|
9c44a73425 | ||
|
|
f8d852d9d7 | ||
|
|
cd0e27204e | ||
|
|
09bbe44557 | ||
|
|
811154ea36 | ||
|
|
b416e511c3 | ||
|
|
66b6a8f7ce | ||
|
|
521f0626d2 | ||
|
|
47c3466084 | ||
|
|
8b611ec73c | ||
|
|
77ee2bf7cc | ||
|
|
3b8de3d5f8 | ||
|
|
fa7bf7cfb0 | ||
|
|
2b1de64324 | ||
|
|
8c467935c4 | ||
|
|
96b8dddbd1 | ||
|
|
c7be95682f | ||
|
|
128a6054c2 | ||
|
|
ef86be910a | ||
|
|
d0727b534e | ||
|
|
e55641a754 | ||
|
|
922f929ad0 | ||
|
|
e7c7d2d8a7 | ||
|
|
a4dad7e585 | ||
|
|
1b130609a3 | ||
|
|
4c9a389abf | ||
|
|
78ee14fbf2 | ||
|
|
c0f2e1f908 | ||
|
|
14397a5914 | ||
|
|
438a18f0d1 | ||
|
|
bf75542e2b | ||
|
|
4dec00bf18 | ||
|
|
9528b226b1 |
15
.github/workflows/build-module.yml
vendored
15
.github/workflows/build-module.yml
vendored
@@ -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
|
||||
|
||||
66
.github/workflows/run-release.yml
vendored
Normal file
66
.github/workflows/run-release.yml
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
name: Sync OpenWRT Releases
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 */3 * *' # Проверка новых релизов раз в три дня
|
||||
workflow_dispatch: # Возможность вручную запустить Action
|
||||
|
||||
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
|
||||
|
||||
- name: Get the latest release from OpenWRT
|
||||
id: get_release
|
||||
run: |
|
||||
curl -s https://api.github.com/repos/openwrt/openwrt/releases/latest > latest_release.json
|
||||
RELEASE_TAG=$(jq -r .tag_name latest_release.json)
|
||||
RELEASE_NAME=$(jq -r .name latest_release.json)
|
||||
echo "::set-output name=release_tag::$RELEASE_TAG"
|
||||
echo "::set-output name=release_name::$RELEASE_NAME"
|
||||
|
||||
- name: Check if release exists in your repo
|
||||
id: check_release
|
||||
run: |
|
||||
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.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 "$(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 }}
|
||||
14
README.md
14
README.md
@@ -10,8 +10,15 @@
|
||||
4) [23.05.3](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v23.05.3)
|
||||
5) [23.05.4](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v23.05.4)
|
||||
|
||||
И собрал пакеты для популярных устройств для OpenWRT [SNAPSHOT](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/SNAPSHOT)
|
||||
|
||||
Также запускал сборку для версии [22.03.7](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v22.03.7), но там для двух платформ сборка завершилась ошибкой. Так как это достаточно старая версия OpenWRT, я не стал разбираться, в чем проблема.
|
||||
|
||||
В дальнейшем при выходе новых релизов OpenWRT будут автоматически создаваться релизы с пакетами AmneziaWG и запускаться сборка пакетов под все устройства, поддерживаемые новой версией. Github action для проверки появления нового релиза запускается автоматически раз в 3 дня, а также может быть запущен вручную.
|
||||
|
||||
## Автоматическая сборка пакетов для SNAPSHOT версии
|
||||
В репозитории настроен github action, который запускается каждые 4 часа и проверяет [страницу снапшотов](https://downloads.openwrt.org/snapshots/targets/) сайта OpenWRT. При этом, если для какой-то платформы обнаруживается снапшот с более новой версией ядра, запускается сборка пакетов под эту платформу, а новые файлы заменяют старые. В целях экономии ресурсов и ускорения процесса сборки, пакеты собираются только для популярных платформ, которые указаны в массиве `SNAPSHOT_SUBTARGETS_TO_BUILD` в файле index.js.
|
||||
|
||||
## Выбор пакетов для своего устройства
|
||||
В соответствии с пунктом [Указываем переменные для сборки](https://github.com/itdoginfo/domain-routing-openwrt/wiki/Amnezia-WG-Build#%D1%83%D0%BA%D0%B0%D0%B7%D1%8B%D0%B2%D0%B0%D0%B5%D0%BC-%D0%BF%D0%B5%D1%80%D0%B5%D0%BC%D0%B5%D0%BD%D0%BD%D1%8B%D0%B5-%D0%B4%D0%BB%D1%8F-%D1%81%D0%B1%D0%BE%D1%80%D0%BA%D0%B8)
|
||||
определить `target` и `subtarget` вашего устройства. Далее перейти на страницу релиза, соответствующего вашей версии OpenWRT, затем поиском по странице (Ctrl+F) найти 3 пакета, название которых оканчивается на `target_subtarget.ipk`, соответствующие вашему устройству.
|
||||
@@ -43,8 +50,15 @@ At the moment I have collected packages for all devices for OpenWRT versions:
|
||||
4) [23.05.3](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v23.05.3)
|
||||
5) [23.05.4](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v23.05.4)
|
||||
|
||||
And collected packages for popular devices for OpenWRT [SNAPSHOT](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/SNAPSHOT)
|
||||
|
||||
I also ran the build for version [22.03.7](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v22.03.7), but the build ended with an error for two platforms. Since this is a fairly old version of OpenWRT, I did not bother to figure out what the problem was.
|
||||
|
||||
In the future, when new OpenWRT releases are released, releases with AmneziaWG packages will be automatically created and the package build will be launched for all devices supported by the new version. Github action for checking for a new release is launched automatically every 3 days, and can also be launched manually.
|
||||
|
||||
## Automatic package build for SNAPSHOT version
|
||||
A github action is configured in the repository, which runs every 4 hours and checks the [snapshots page](https://downloads.openwrt.org/snapshots/targets/) of the OpenWRT website. At the same time, if a snapshot with a newer kernel version is found for some platform, the package build for this platform is launched, and the new files replace the old ones. In order to save resources and speed up the build process, packages are built only for popular platforms, which are specified in the `SNAPSHOT_SUBTARGETS_TO_BUILD` array in the index.js file.
|
||||
|
||||
## Selecting packages for your device
|
||||
In accordance with the paragraph [Specify variables for builds](https://github.com/itdoginfo/domain-routing-openwrt/wiki/Amnezia-WG-Build#%D1%83%D0%BA%D0%B0%D0%B7%D1%8B%D0%B2%D0%B0%D0%B5%D0%BC-%D0%BF%D0%B5%D1%80%D0%B5%D0%BC%D0%B5%D0%BD%D0%BD%D1%8B%D0%B5-%D0%B4%D0%BB%D1%8F-%D1%81%D0%B1%D0%BE%D1%80%D0%BA%D0%B8) (instructions in Russian) determine `target` and `subtarget` of your device. Then go to the release page corresponding to your OpenWRT version, then search the page (Ctrl+F) to find 3 packages whose names end in `target_subtarget.ipk` corresponding to your device.
|
||||
|
||||
|
||||
6
index.js
6
index.js
@@ -4,8 +4,8 @@ const core = require('@actions/core');
|
||||
|
||||
const version = process.argv[2]; // Получение версии OpenWRT из аргумента командной строки
|
||||
|
||||
// mediatek, ramips
|
||||
const SNAPSHOT_SUBTARGETS_TO_BUILD = ['filogic', 'mt7622', 'mt7623', 'mt7629', 'mt7620', 'mt7621', 'mt76x8'];
|
||||
const SNAPSHOT_TARGETS_TO_BUILD = ['mediatek', 'ramips', 'x86', 'armsr'];
|
||||
const SNAPSHOT_SUBTARGETS_TO_BUILD = ['filogic', 'mt7622', 'mt7623', 'mt7629', 'mt7620', 'mt7621', 'mt76x8', '64', 'generic', 'armv8'];
|
||||
|
||||
if (!version) {
|
||||
core.setFailed('Version argument is required');
|
||||
@@ -78,7 +78,7 @@ async function main() {
|
||||
for (const subtarget of subtargets) {
|
||||
const { vermagic, pkgarch } = await getDetails(target, subtarget);
|
||||
|
||||
if (version !== 'SNAPSHOT' || SNAPSHOT_SUBTARGETS_TO_BUILD.includes(subtarget)) {
|
||||
if (version !== 'SNAPSHOT' || (SNAPSHOT_SUBTARGETS_TO_BUILD.includes(subtarget) && SNAPSHOT_TARGETS_TO_BUILD.includes(target))) {
|
||||
jobConfig.push({
|
||||
tag: version,
|
||||
target,
|
||||
|
||||
Reference in New Issue
Block a user