-
Notifications
You must be signed in to change notification settings - Fork 0
150 lines (127 loc) Β· 4.54 KB
/
make_package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# This is open source software, licensed under the MIT License.
# https://opensource.org/license/mit
#
# Copyright (C) 2024 BobbyUnknown
#
# Description:
# This software provides a secure tunneling application for OpenWrt.
# The application allows users to configure and manage ngrok tunnels
# on their OpenWrt router, enabling secure remote access to local
# network services through public endpoints. It features a user-friendly
# web interface for easy tunnel management and configuration.
name: Build Ngrok Package & Core
on:
workflow_dispatch:
inputs:
ngrok_version:
description: 'Ngrok version'
required: true
default: 'v3.19.1'
type: string
sdk_version:
description: 'OpenWrt SDK version'
required: true
default: '23.05.2'
type: string
jobs:
build_core:
permissions:
contents: write
name: Build Core
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- arch: x86_64
target: x86-64
- arch: aarch64
target: aarch64_cortex-a53
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Get Package Info
id: get_info
run: |
echo "version=${{ inputs.ngrok_version }}" >> $GITHUB_OUTPUT
echo "PKG_NAME=ngrok" >> $GITHUB_OUTPUT
- name: Preparing Core
run: |
mkdir -p feeds artifacts
cp -rf ./ngrok-arm ./feeds/
cp -rf ./ngrok-x86 ./feeds/
echo "src-link action ${{ github.workspace }}/feeds" > feeds.conf.default
- name: Building Core Packages
uses: openwrt/gh-action-sdk@v5
env:
ARCH: ${{ matrix.target }}-${{ inputs.sdk_version }}
ARTIFACTS_DIR: ${{ github.workspace }}/artifacts
FEED_DIR: ${{ github.workspace }}/feeds
PACKAGES: ngrok
NO_SHFMT_CHECK: 1
- name: Upload Core Artifacts
uses: actions/upload-artifact@v4
with:
name: ngrok-core-${{ matrix.arch }}
path: ${{ github.workspace }}/artifacts/bin/packages/${{ matrix.target }}/action/ngrok*
build_luci:
permissions:
contents: write
name: Build LuCI Package
runs-on: ubuntu-latest
needs: build_core
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Preparing Package
run: |
mkdir -p feeds artifacts
cp -rf ./luci-app-ngrok ./feeds/
- name: Building LuCI Package
uses: openwrt/gh-action-sdk@v5
env:
ARCH: all
ARTIFACTS_DIR: ${{ github.workspace }}/artifacts
FEED_DIR: ${{ github.workspace }}/feeds
PACKAGES: luci-app-ngrok
NO_SHFMT_CHECK: 1
- name: Upload LuCI Package
uses: actions/upload-artifact@v4
with:
name: luci-app-ngrok
path: ${{ github.workspace }}/artifacts/bin/packages/*/action/luci-app-ngrok*
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
release_date=$(date +'%y%m%d')
release_name="ngrok-${release_date}"
release_tag="${{ inputs.ngrok_version }}"
release_body="# π Ngrok for OpenWrt
## π¦ Release Version: \`${{ inputs.ngrok_version }}\`
### π Description
This software provides a secure tunneling application for OpenWrt.
The application allows users to configure and manage ngrok tunnels
on their OpenWrt router, enabling secure remote access to local
network services through public endpoints.
### π Features:
- Secure tunnel management
- LuCI web interface
- Support for x86_64 and aarch64
- Easy configuration through web UI
### π¦ Packages:
- ngrok-core: Tunnel service binary
- luci-app-ngrok: Web interface for configuration
> π Always ensure you're using the latest version for the best performance!
*Thank you for using Ngrok for OpenWRT!* π"
gh release create "$release_tag" \
--title "$release_name" \
--notes "$release_body" \
--generate-notes=false
- name: Upload Release Assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
for file in ${{ github.workspace }}/artifacts/bin/packages/*/action/*; do
gh release upload ${{ inputs.ngrok_version }} "$file"
done