Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mgqnfoqv7k2w
AutoBuildImmortalWrt
Commits
a35ec513
"vscode:/vscode.git/clone" did not exist on "c3442c1f6fabe54adb82d2d676920c5f31b9834e"
Unverified
Commit
a35ec513
authored
Dec 05, 2024
by
wukongdaily
Committed by
GitHub
Dec 05, 2024
Browse files
Create test.yml
parent
36f629b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
0 deletions
+54
-0
.github/workflows/test.yml
.github/workflows/test.yml
+54
-0
No files found.
.github/workflows/test.yml
0 → 100644
View file @
a35ec513
name
:
release
on
:
workflow_dispatch
:
jobs
:
build
:
runs-on
:
ubuntu-latest
steps
:
-
name
:
Checkout code
uses
:
actions/checkout@v3
-
name
:
Set executable permissions
run
:
chmod +x build.sh
-
name
:
Setup Docker and Build
run
:
|
docker run --rm -i \
--user root \
-v "${{ github.workspace }}/bin:/home/build/immortalwrt/bin" \
-v "${{ github.workspace }}/files:/home/build/immortalwrt/files" \
-v "${{ github.workspace }}/Makefile:/home/build/immortalwrt/target/linux/x86/Makefile" \
-v "${{ github.workspace }}/build.sh:/home/build/immortalwrt/build.sh" \
immortalwrt/imagebuilder:x86-64-openwrt-23.05.4 /bin/sh /home/build/immortalwrt/build.sh
-
name
:
Locate firmware file
id
:
locate_file
run
:
|
firmware_file=$(find "${{ github.workspace }}/bin" -name '*squashfs-combined-efi.img.gz' | head -n 1)
if [ -z "$firmware_file" ]; then
echo "Firmware file not found!" && exit 1
fi
echo "Firmware file located at $firmware_file"
echo "firmware_path=$firmware_file" >> $GITHUB_ENV
-
name
:
Create Release
id
:
create_release
uses
:
actions/create-release@v1
with
:
tag_name
:
build-${{ github.run_number }}
release_name
:
"
Build
#${{
github.run_number
}}"
body
:
"
Automatically
generated
firmware
build"
draft
:
false
prerelease
:
false
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
-
name
:
Upload firmware to Release
uses
:
actions/upload-release-asset@v1
with
:
upload_url
:
${{ steps.create_release.outputs.upload_url }}
asset_path
:
${{ env.firmware_path }}
asset_name
:
firmware-${{ github.run_number }}.img.gz
asset_content_type
:
application/gzip
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment