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
|
||||
echo "TAG_REF=${TAG_REF}" >> $GITHUB_ENV
|
||||
|
||||
- name: Checkout difos repo
|
||||
run: |
|
||||
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 code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout difos-files repo
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
if [ -d "/opt/difos-files/.git" ]; then
|
||||
cd /opt/difos-files
|
||||
git reset --hard
|
||||
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
|
||||
apt-get update
|
||||
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
|
||||
npm install -g pkg@5.8.1
|
||||
|
||||
- name: Add Custom Files
|
||||
run: |
|
||||
cd /opt/difos-files
|
||||
./setup-all.sh /opt/difos $GIT_PAT
|
||||
echo $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
|
||||
run: |
|
||||
cd /opt/difos
|
||||
FORCE_UNSAFE_CONFIGURE=1 CONFIG_TARGET_ROOTFS_INITRAMFS=n make distclean -j4
|
||||
./scripts/feeds update -a
|
||||
./scripts/feeds install -a
|
||||
rm -f .config
|
||||
cp -rf configs/dmsbg100.config .config
|
||||
make defconfig
|
||||
FORCE_UNSAFE_CONFIGURE=1 CONFIG_TARGET_ROOTFS_INITRAMFS=n make download -j4
|
||||
FORCE_UNSAFE_CONFIGURE=1 CONFIG_TARGET_ROOTFS_INITRAMFS=n make -j4
|
||||
FORCE_UNSAFE_CONFIGURE=1 CONFIG_TARGET_ROOTFS_INITRAMFS=n make clean -j16
|
||||
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
|
||||
run: |
|
||||
difosDir='/opt/difos'
|
||||
difosDir='.'
|
||||
cd $difosDir
|
||||
folder_name=opkg-v$TAG_REF-$ENVIRONMENT
|
||||
mkdir -p $folder_name
|
||||
cp -rf ./bin/packages/aarch64_cortex-a53/* $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 }}
|
||||
echo "Would have uploaded $folder_name.tar.gz to portal"
|
||||
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 }}
|
||||
|
||||
- name: Publish Release
|
||||
run: |
|
||||
difosDir='/opt/difos'
|
||||
difosDir='.'
|
||||
cd $difosDir
|
||||
sdFile=$(find ./bin/ -name "*difos*" | grep sdcard | 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 }}
|
||||
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 }}
|
||||
echo "Would have uploaded $sqFile to portal"
|
||||
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=@$sqFile" https://$PORTAL_ENDPOINT/software/upload/sysupgrade/$ENVIRONMENT/${{ env.PORTAL_API_KEY }}
|
||||
|
|
Loading…
Reference in a new issue