-
Notifications
You must be signed in to change notification settings - Fork 0
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 e8b1aa4
Showing
10 changed files
with
1,011 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,43 @@ | ||
# Action to build openwrt images | ||
--- | ||
name: build openwrt images | ||
|
||
on: | ||
# Allows manual workflow run (must in default branch to work) | ||
workflow_dispatch: | ||
workflow_call: | ||
inputs: | ||
commit_long_sha: | ||
required: true | ||
type: string | ||
# push: | ||
# branches: | ||
# - main | ||
# paths: | ||
# - 'custom-feed/**' | ||
|
||
jobs: | ||
build-openwrt-image: | ||
runs-on: ubuntu-24.04 | ||
|
||
steps: | ||
- name: Checkout repo from main if run from compare-release | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.commit_long_sha }} | ||
|
||
- name: Build image | ||
run: | | ||
./openwrt-builder | ||
- name: Upload openwrt tplink_archer-c7-v4 image artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: openwrt-image.tplink_archer-c7-v4 | ||
path: build-output.tplink_archer-c7-v4* | ||
|
||
- name: Upload openwrt totolink_x5000r image artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: openwrt-image.totolink_x5000r | ||
path: build-output.totolink_x5000r* |
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,42 @@ | ||
# Action to build openwrt images | ||
--- | ||
name: compare release | ||
|
||
on: | ||
# Allows manual workflow run (must in default branch to work) | ||
workflow_dispatch: | ||
|
||
jobs: | ||
compare-release: | ||
runs-on: ubuntu-24.04 | ||
permissions: | ||
contents: write | ||
outputs: | ||
committed: ${{ steps.commit.outputs.committed }} | ||
commit_long_sha: ${{ steps.commit.outputs.commit_long_sha }} | ||
|
||
steps: | ||
- name: Checkout repo | ||
id: checkout-repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: compare | ||
id: compare | ||
run: | | ||
podman -v | ||
.github/workflows/scripts/compare-release | ||
- name: commit | ||
id: commit | ||
if: ${{ steps.compare.outputs.sha256 != '' }} | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
commit: --signoff | ||
default_author: github_actions | ||
|
||
build-openwrt-images: | ||
needs: compare-release | ||
if: ${{ needs.compare-release.outputs.committed == 'true' }} | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
commit_long_sha: ${{ needs.compare-release.outputs.commit_long_sha }} |
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,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
|
||
REPO="netbirdio/netbird" | ||
REMOTE_TAG="$(curl -sL https://api.github.com/repos/"${REPO}"/releases/latest | jq -r ".tag_name")" | ||
REMOTE_TAG_STRIP="$(t="${REMOTE_TAG}" && echo "${t:1}")" | ||
LOCAL_TAG="$(grep PKG_VERSION:= custom-feed/netbird/Makefile)" | ||
LOCAL_TAG_STRIP="$(t="${LOCAL_TAG}" && echo "${t:13}")" | ||
|
||
if [[ "${LOCAL_TAG_STRIP}" = "${REMOTE_TAG_STRIP}" ]]; then | ||
echo "ok" | ||
else | ||
echo "not ok" | ||
sed -i "s/\(PKG_VERSION:=\).*/\1${REMOTE_TAG_STRIP}/" custom-feed/netbird/Makefile | ||
curl -slL https://github.com/"${REPO}"/archive/refs/tags/"${REMOTE_TAG}".tar.gz -o temp_pkg | ||
SHA256="$(sha256sum temp_pkg | head -c 64 && rm temp_pkg)" | ||
sed -i "s/\(PKG_HASH:=\).*/\1${SHA256}/" custom-feed/netbird/Makefile | ||
if [[ "${GITHUB_ACTIONS}" = "true" ]]; then | ||
echo "sha256=${SHA256}" >> "${GITHUB_OUTPUT}" | ||
fi | ||
fi |
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 @@ | ||
/build-output/ |
Oops, something went wrong.