-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 643620e
Showing
5 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Build and Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
build_release: | ||
runs-on: ubuntu-latest | ||
name: Build and release luci-app-xray | ||
steps: | ||
- name: Build | ||
env: | ||
WORKSPACE: ${{ github.workspace }} | ||
uses: woniuzfb/luci-app-xray@v1 | ||
id: build | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: '*.ipk' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Done | ||
run: echo "Build complete - ${{ steps.build.outputs.date }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Container image that runs your code | ||
FROM openwrtorg/sdk:aarch64_generic-snapshot | ||
|
||
# Copies your code file from your action repository to the filesystem path `/` of the container | ||
COPY build.sh /build.sh | ||
|
||
# Code file to execute when the docker container starts up (`entrypoint.sh`) | ||
ENTRYPOINT ["/build.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# luci-app-xray docker action | ||
|
||
This action build luci-app-xray with openwrt docker container. | ||
|
||
Package name is the same as luci-app-v2ray. | ||
|
||
## Outputs | ||
|
||
### `date` | ||
|
||
The build date. | ||
|
||
## Example usage | ||
|
||
```bash | ||
env: | ||
WORKSPACE: ${{ github.workspace }} | ||
uses: woniuzfb/luci-app-xray@v1 | ||
|
||
git push -d origin v2.x.x | ||
git tag -a v2.x.x -f | ||
git push origin v2.x.x | ||
|
||
opkg install luci-app-v2ray_2.x.x_all.ipk --force-reinstall | ||
opkg install luci-i18n-v2ray-zh-cn_git-xxxx_all.ipk | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# action.yml | ||
name: 'build luci-app-xray' | ||
description: 'build luci-app-xray with openwrt docker container action' | ||
outputs: | ||
date: | ||
description: 'luci-app-xray build date' | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/sh -l | ||
|
||
cd /home/build/openwrt || exit 1 | ||
|
||
cp -f feeds.conf.default feeds.conf | ||
sed -i 's#git.openwrt.org/project/luci#github.com/openwrt/luci#' feeds.conf | ||
|
||
test -d "package/luci-app-v2ray" && \ | ||
rm -rf "package/luci-app-v2ray" | ||
|
||
git clone -b luci2 https://github.com/woniuzfb/luci-app-v2ray.git package/luci-app-v2ray | ||
|
||
./scripts/feeds update luci | ||
./scripts/feeds install -a -p luci | ||
|
||
make defconfig | ||
|
||
make package/luci-app-v2ray/compile V=s | ||
|
||
find "bin/packages/" -type f -name "luci-app-v2ray*.ipk" -exec sudo cp -f {} "$WORKSPACE" \; | ||
find "bin/packages/" -type f -name "luci-i18n*.ipk" -exec sudo cp -f {} "$WORKSPACE" \; | ||
find "$WORKSPACE" -type f -name "*.ipk" -exec ls -lh {} \; | ||
|
||
date=$(date) | ||
echo "::set-output name=date::$date" |