Compile Official test #54
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
# | |
# Copyright (c) 2019-2021 P3TERX <https://p3terx.com> | |
# Modified by guhill1 2022-2024 | |
# | |
# This is free software, licensed under the MIT License. | |
# See /LICENSE for more information. | |
# | |
# https://github.com/P3TERX/Actions-OpenWrt | |
# https://github.com/guhill1/auto-build-openwrt/ | |
# Description: compile openwrt firmware by GitHub action | |
name: Compile Official test | |
on: | |
#repository_dispatch: | |
workflow_dispatch: | |
inputs: | |
ssh: | |
description: 'SSH connection to Actions' | |
required: false | |
default: 'false' | |
env: | |
REPO_URL: https://github.com/openwrt/openwrt | |
REPO_BRANCH: main | |
FEEDS_CONF: official/feeds.conf.default | |
CONFIG_FILE: official/.config | |
FILES: official/files | |
DIST_NAME: openwrt | |
# files for patch | |
FILES_PAT: official/files_pat | |
DIY_P1_SH: diy-part1.sh | |
DIY_P2_SH: diy-part2_of.sh | |
UPLOAD_BIN_DIR: false | |
UPLOAD_FIRMWARE: true | |
UPLOAD_COWTRANSFER: false | |
UPLOAD_WETRANSFER: false | |
UPLOAD_RELEASE: false | |
TZ: Asia/Shanghai | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@main | |
- name: Initialization environment | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
sudo chown $USER:$GROUPS $GITHUB_WORKSPACE | |
- name: Load custom feeds | |
run: | | |
chmod +x $DIY_P1_SH | |
mkdir openwrt | |
cd openwrt | |
$GITHUB_WORKSPACE/$DIY_P1_SH | |
- name: Load custom configuration | |
run: | | |
[ -e $FILES ] && mv $FILES openwrt/files | |
[ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config | |
chmod +x $DIY_P2_SH | |
cd openwrt | |
$GITHUB_WORKSPACE/$DIY_P2_SH | |
- name: Download package | |
id: package | |
run: | | |
[ -e $FILES ] && mv -v $FILES openwrt/files | |
[ -e $FILES_PAT ] && cp -R -v $FILES_PAT/* openwrt | |
echo $DIST_NAME >> $GITHUB_OUTPUT | |
- name: Print version from file to console | |
id: write-content | |
shell: bash | |
run: | | |
echo "Pwsh version: ${{ steps.package.outputs }}" | |
echo "Bash version: ${{ steps.package.outputs }}" | |