Skip to content

Commit

Permalink
Update build-XiaoxinSGSIs.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxindada authored Jun 24, 2021
1 parent 4772715 commit 7feb32c
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions .github/workflows/build-XiaoxinSGSIs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
if: github.event.repository.owner.id == github.event.sender.id

steps:
Expand All @@ -25,6 +25,7 @@ jobs:
sudo -E apt-get update
sudo -E apt-get -y autoremove --purge
sudo -E apt-get clean
df -h
- name: Get variables
run: |
Expand All @@ -38,15 +39,13 @@ jobs:
echo "::set-output name=make_smartisanos::$(jq -r '.make_smartisanos' sgsi.json)"
echo "::set-output name=make_zui::$(jq -r '.make_zui' sgsi.json)"
echo "::set-output name=make_super::$(jq -r '.make_super' sgsi.json)"
echo "::set-output name=upload_transfer::$(jq -r '.upload_transfer' sgsi.json)"
echo "::set-output name=upload_artifact::$(jq -r '.upload_artifact' sgsi.json)"
id: var

- name: Download XiaoxinSGSIs Tools
uses: robinraju/release-downloader@v1
with:
repository: "xiaoxindada/SGSI-build-tool"
latest: true
tag: "v1.9"
fileName: "SGSI-build-tool.tar"

- name: Initialization environment
Expand Down Expand Up @@ -122,18 +121,22 @@ jobs:
zip -r Patch3.zip Patch/Patch3/*
sudo mv Patch1.zip Patch2.zip Patch3.zip SGSI-build-tool/10/SGSI/
- name: 7z SGSI
run: 7za a -t7z -r ${{ steps.var.outputs.pack_sgsi }} SGSI-build-tool/10/SGSI/*

- name: Upload SGSI to WeTransfer
if: steps.var.outputs.upload_transfer == 'true'
- name: zip SGSI
run: |
curl -sL https://git.io/file-transfer | sh
./transfer wet ${{ steps.var.outputs.pack_sgsi }}
- name: Upload SGSI to Artifact
if: steps.var.outputs.upload_artifact == 'true'
uses: actions/upload-artifact@v2
with:
name: XiaoxinSGSIs
path: ${{ steps.var.outputs.pack_sgsi }}
mkdir -p upload
zip -r ${{ steps.var.outputs.pack_sgsi }} SGSI-build-tool/10/SGSI/*
if [[ $(du -sh "${{ steps.var.outputs.pack_sgsi }}" | awk '{print $1}') -gt 2097152000 ]];then
echo -e "split packaging..."
tar -cpzf - "${{ steps.var.outputs.pack_sgsi }}" | split -d -b 1024m - "upload/${{ steps.var.outputs.pack_sgsi }}"
else
mv ${{ steps.var.outputs.pack_sgsi }} upload/
fi
ls "upload"
- name: Upload SGSI to action-gh-release...
uses: ncipollo/[email protected]
with:
artifacts: upload/*
name: xiaoxinSGSI-ab-Android10-unpack
tag: xiaoxinSGSI-ab-Android10-${{ github.run_number }}
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 7feb32c

Please sign in to comment.