workflow: publish opkg to portal
This commit is contained in:
parent
06be23b801
commit
a0588fa340
1 changed files with 13 additions and 2 deletions
|
@ -9,13 +9,14 @@ env:
|
|||
PORTAL_API_KEY: ${{ secrets.PORTAL_API_KEY }}
|
||||
|
||||
jobs:
|
||||
build-and-publish:
|
||||
Build & Publish:
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: Determine Environment
|
||||
id: determine-env
|
||||
run: |
|
||||
TAG_REF=${GITHUB_REF#refs/tags/}
|
||||
echo "TAG_REF=$TAG_REF" >> $GITHUB_ENV
|
||||
IFS='.' read -ra VERSION <<< "$TAG_REF"
|
||||
if [[ ${VERSION[2]} -eq 0 ]]; then
|
||||
echo "ENVIRONMENT=master" >> $GITHUB_ENV
|
||||
|
@ -62,7 +63,17 @@ jobs:
|
|||
FORCE_UNSAFE_CONFIGURE=1 CONFIG_TARGET_ROOTFS_INITRAMFS=n make download -j$(nproc)
|
||||
FORCE_UNSAFE_CONFIGURE=1 CONFIG_TARGET_ROOTFS_INITRAMFS=n make world -j$(nproc)
|
||||
|
||||
- name: Publish Release
|
||||
- name: Publish OPKG to Portal
|
||||
run: /
|
||||
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 -X POST -H 'Content-Type: multipart/form-data' -F "file=@$folder_name.tar.gz" http://$PORTAL_ENDPOINT/software/upload/opkg/${{ env.PORTAL_API_KEY }}
|
||||
|
||||
- name: Publish DifOS to Portal
|
||||
run: |
|
||||
difosDir='.'
|
||||
cd $difosDir
|
||||
|
|
Loading…
Reference in a new issue