Skip to content

Commit

Permalink
push
Browse files Browse the repository at this point in the history
  • Loading branch information
luochongjun committed Aug 2, 2022
1 parent 7171e1a commit 09bfe73
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/set_variable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ on:
pkgname:
description: 'Openwrt package name'
required: true
email:
description: 'Git accuont email address'
required: false
password:
description: 'Git account password'
required: false

jobs:
setpackage:
Expand All @@ -29,6 +35,8 @@ jobs:
SOURCECODEURL: ${{ github.event.inputs.sourcecode }}
PKGNAME: ${{ github.event.inputs.pkgname }}
BOARD: ${{ github.event.inputs.device }}
EMAIL: ${{ github.event.inputs.email }}
PASSWORD: ${{ github.event.inputs.password }}
run: |
cd $GITHUB_WORKSPACE
chmod +x ./build.sh
Expand Down
10 changes: 7 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@
echo SOURCECODEURL: "$SOURCECODEURL"
echo PKGNAME: "$PKGNAME"
echo BOARD: "$BOARD"
EMAIL=${EMAIL:-"aa@163.com"}
echo EMAIL: "$EMAIL"
echo PASSWORD: "$PASSWORD"

WORKDIR="$(pwd)"

sudo -E apt-get update
sudo -E apt-get install git asciidoc bash bc binutils bzip2 fastjar flex gawk gcc genisoimage gettext git intltool jikespg libgtk2.0-dev libncurses5-dev libssl1.0-dev make mercurial patch perl-modules python2.7-dev rsync ruby sdcc subversion unzip util-linux wget xsltproc zlib1g-dev zlib1g-dev -y

git config --global user.email "aa@163.com"
git config --global user.email "${EMAIL}"
git config --global user.name "aa"
[ -n "${PASSWORD}" ] && git config --global user.password "${PASSWORD}"

mkdir -p ${WORKDIR}/buildsource
cd ${WORKDIR}/buildsource
Expand Down Expand Up @@ -43,12 +47,12 @@ case "$BOARD" in
esac

cd openwrt-sdk
sed -i "1i\src-link local ${WORKDIR}/buildsource" feeds.conf.default
sed -i "1i\src-link githubaction ${WORKDIR}/buildsource" feeds.conf.default
./scripts/feeds update -a
./scripts/feeds install -a
echo CONFIG_ALL=y >.config
make defconfig
make V=s ./package/feeds/local/${PKGNAME}/compile
make V=s ./package/feeds/githubaction/${PKGNAME}/compile

find bin -type f -exec ls -lh {} \;
find bin -type f -name "*.ipk" -exec cp -f {} "${WORKDIR}" \;

0 comments on commit 09bfe73

Please sign in to comment.