Update .forgejo/workflows/dmsbg-100.yml
All checks were successful
/ build-and-publish (push) Successful in 2h25m39s
All checks were successful
/ build-and-publish (push) Successful in 2h25m39s
This commit is contained in:
parent
fdba8c675e
commit
d589c3f7b2
1 changed files with 18 additions and 34 deletions
|
@ -29,63 +29,47 @@ jobs:
|
||||||
fi
|
fi
|
||||||
echo "TAG_REF=${TAG_REF}" >> $GITHUB_ENV
|
echo "TAG_REF=${TAG_REF}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Checkout difos repo
|
- name: Checkout code
|
||||||
run: |
|
uses: actions/checkout@v4
|
||||||
if [ -d "/opt/difos/.git" ]; then
|
|
||||||
cd /opt/difos
|
|
||||||
git reset --hard
|
|
||||||
git clean -fd
|
|
||||||
git pull origin master
|
|
||||||
else
|
|
||||||
git clone https://$GIT_PAT:x-oauth-basic@git.difuse.io/Difuse/difos.git /opt/difos
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Checkout difos-files repo
|
- name: Install Dependencies
|
||||||
run: |
|
run: |
|
||||||
if [ -d "/opt/difos-files/.git" ]; then
|
apt-get update
|
||||||
cd /opt/difos-files
|
apt-get install -y build-essential clang flex bison g++ gawk gcc-multilib g++-multilib gettext libncurses-dev libssl-dev python3-distutils rsync unzip zlib1g-dev file wget python3-setuptools swig
|
||||||
git reset --hard
|
npm install -g pkg@5.8.1
|
||||||
git clean -fd
|
|
||||||
git pull origin master
|
|
||||||
else
|
|
||||||
git clone https://$GIT_PAT:x-oauth-basic@git.difuse.io/Difuse/difos-files.git /opt/difos-files
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Add Custom Files
|
- name: Add Custom Files
|
||||||
run: |
|
run: |
|
||||||
cd /opt/difos-files
|
echo $GIT_PAT
|
||||||
./setup-all.sh /opt/difos $GIT_PAT
|
git clone https://$GIT_PAT:x-oauth-basic@git.difuse.io/Difuse/difos-files.git
|
||||||
|
cd difos-files
|
||||||
|
./setup-all.sh ${{ github.workspace }} $GIT_PAT
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
cd /opt/difos
|
|
||||||
FORCE_UNSAFE_CONFIGURE=1 CONFIG_TARGET_ROOTFS_INITRAMFS=n make distclean -j4
|
|
||||||
./scripts/feeds update -a
|
./scripts/feeds update -a
|
||||||
./scripts/feeds install -a
|
./scripts/feeds install -a
|
||||||
rm -f .config
|
|
||||||
cp -rf configs/dmsbg100.config .config
|
cp -rf configs/dmsbg100.config .config
|
||||||
make defconfig
|
make defconfig
|
||||||
FORCE_UNSAFE_CONFIGURE=1 CONFIG_TARGET_ROOTFS_INITRAMFS=n make download -j4
|
FORCE_UNSAFE_CONFIGURE=1 CONFIG_TARGET_ROOTFS_INITRAMFS=n make clean -j16
|
||||||
FORCE_UNSAFE_CONFIGURE=1 CONFIG_TARGET_ROOTFS_INITRAMFS=n make -j4
|
FORCE_UNSAFE_CONFIGURE=1 CONFIG_TARGET_ROOTFS_INITRAMFS=n make download -j16
|
||||||
|
FORCE_UNSAFE_CONFIGURE=1 CONFIG_TARGET_ROOTFS_INITRAMFS=n make world -j16
|
||||||
|
|
||||||
- name: Publish Packages to Portal
|
- name: Publish Packages to Portal
|
||||||
run: |
|
run: |
|
||||||
difosDir='/opt/difos'
|
difosDir='.'
|
||||||
cd $difosDir
|
cd $difosDir
|
||||||
folder_name=opkg-v$TAG_REF-$ENVIRONMENT
|
folder_name=opkg-v$TAG_REF-$ENVIRONMENT
|
||||||
mkdir -p $folder_name
|
mkdir -p $folder_name
|
||||||
cp -rf ./bin/packages/aarch64_cortex-a53/* $folder_name/
|
cp -rf ./bin/packages/aarch64_cortex-a53/* $folder_name/
|
||||||
tar -czvf $folder_name.tar.gz $folder_name
|
tar -czvf $folder_name.tar.gz $folder_name
|
||||||
# curl -L -X POST -H 'Content-Type: multipart/form-data' -F "file=@$folder_name.tar.gz" https://$PORTAL_ENDPOINT/software/upload/opkg/${{ env.PORTAL_API_KEY }}
|
curl -L -X POST -H 'Content-Type: multipart/form-data' -F "file=@$folder_name.tar.gz" https://$PORTAL_ENDPOINT/software/upload/opkg/${{ env.PORTAL_API_KEY }}
|
||||||
echo "Would have uploaded $folder_name.tar.gz to portal"
|
|
||||||
|
|
||||||
- name: Publish Release
|
- name: Publish Release
|
||||||
run: |
|
run: |
|
||||||
difosDir='/opt/difos'
|
difosDir='.'
|
||||||
cd $difosDir
|
cd $difosDir
|
||||||
sdFile=$(find ./bin/ -name "*difos*" | grep sdcard | head -n1)
|
sdFile=$(find ./bin/ -name "*difos*" | grep sdcard | head -n1)
|
||||||
sqFile=$(find ./bin/ -name "*difos*" | grep squash | head -n1)
|
sqFile=$(find ./bin/ -name "*difos*" | grep squash | head -n1)
|
||||||
# curl -L -X POST -H 'Content-Type: multipart/form-data' -F "file=@$sdFile" https://$PORTAL_ENDPOINT/software/upload/sd/$ENVIRONMENT/${{ env.PORTAL_API_KEY }}
|
curl -L -X POST -H 'Content-Type: multipart/form-data' -F "file=@$sdFile" https://$PORTAL_ENDPOINT/software/upload/sd/$ENVIRONMENT/${{ env.PORTAL_API_KEY }}
|
||||||
echo "Would have uploaded $sdFile to portal"
|
curl -L -X POST -H 'Content-Type: multipart/form-data' -F "file=@$sqFile" https://$PORTAL_ENDPOINT/software/upload/sysupgrade/$ENVIRONMENT/${{ env.PORTAL_API_KEY }}
|
||||||
# curl -L -X POST -H 'Content-Type: multipart/form-data' -F "file=@$sqFile" https://$PORTAL_ENDPOINT/software/upload/sysupgrade/$ENVIRONMENT/${{ env.PORTAL_API_KEY }}
|
|
||||||
echo "Would have uploaded $sqFile to portal"
|
|
||||||
|
|
Loading…
Reference in a new issue