Skip to content

Commit 39d5b19

Browse files
committed
ci: add debian workflow
1 parent 13a9f98 commit 39d5b19

1 file changed

Lines changed: 94 additions & 0 deletions

File tree

.github/workflows/debian.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# .github/workflows/main.yml
2+
name: Debian
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
bpi-r2:
8+
type: boolean
9+
bpi-r64:
10+
type: boolean
11+
bpi-r2pro:
12+
type: boolean
13+
bpi-r3:
14+
type: boolean
15+
bpi-r4:
16+
type: boolean
17+
18+
jobs:
19+
debian-gdrive-upload:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v2
24+
25+
- name: Setup env
26+
run: |
27+
echo "DT=$(date +'%Y-%m-%d_%H%M')" >> $GITHUB_ENV
28+
29+
- name: Setup cache
30+
id: cache
31+
uses: actions/cache@v4
32+
with:
33+
path: "*_arm*.tar.gz"
34+
key: ${{ runner.os }}-chroot
35+
restore-keys: ${{ runner.os }}-chroot
36+
37+
#- name: Acquire Google access token for file download
38+
# id: google-access-token
39+
# uses: playeveryware/action-google-access-token@v1
40+
# with:
41+
# credentials: ${{ secrets.CREDENTIALS_RAW }}
42+
# scope: 'https://www.googleapis.com/auth/drive.readonly'
43+
44+
#- name: Download BPI-R4 kernel file
45+
# uses: playeveryware/action-google-drive-download@v1
46+
# with:
47+
# token: ${{ steps.google-access-token.outputs.token }}
48+
# file-id: 14IPr6_h0_NEe8ute6HXMUNACnHiaaab4
49+
# path: ${{ env.R4Kernel }}
50+
#uses: satackey/action-google-drive@v1
51+
#with:
52+
# skicka-tokencache-json: ${{ secrets.CREDENTIALS_RAW }}
53+
# download-from: https://drive.google.com/file/d/14IPr6_h0_NEe8ute6HXMUNACnHiaaab4/view?usp=drive_link
54+
# download-to: ./bpi-r4-kernel.tar.gz
55+
56+
- name: Install depencies
57+
run: |
58+
sudo apt update
59+
sudo apt install python3 parted qemu-user-static debootstrap binfmt-support
60+
61+
- name: Build R2 Debian ${{ vars.DEBIAN_DIST }} Images
62+
if: ${{ inputs.bpi-r2 }}
63+
run: |
64+
./buildimg.sh bpi-r2 ${{ vars.DEBIAN_DIST }}
65+
./buildimg.sh bpi-r2 ${{ vars.DEBIAN_DIST }} 6.12
66+
67+
- name: Build R64 Debian ${{ vars.DEBIAN_DIST }} Image
68+
if: ${{ inputs.bpi-r64 }}
69+
run: |
70+
./buildimg.sh bpi-r64 ${{ vars.DEBIAN_DIST }}
71+
72+
- name: Build R2Pro Debian ${{ vars.DEBIAN_DIST }} Image
73+
if: ${{ inputs.bpi-r2pro }}
74+
run: |
75+
./buildimg.sh bpi-r2pro ${{ vars.DEBIAN_DIST }}
76+
77+
- name: Build R3 Debian ${{ vars.DEBIAN_DIST }} Image
78+
if: ${{ inputs.bpi-r3 }}
79+
run: |
80+
./buildimg.sh bpi-r3 ${{ vars.DEBIAN_DIST }}
81+
82+
- name: Build R4 Debian ${{ vars.DEBIAN_DIST }} Image
83+
if: ${{ inputs.bpi-r4 }}
84+
run: |
85+
#echo -e "skipkerneldownload=1\nkernelfile=${{ env.R4Kernel }}" > sourcefiles_bpi-r4.conf
86+
./buildimg.sh bpi-r4 ${{ env.DEBIAN_DIST }}
87+
88+
- name: Upload to gdrive
89+
uses: adityak74/google-drive-upload-git-action@main
90+
with:
91+
credentials: ${{ secrets.CREDENTIALS }}
92+
filename: "*.img.gz"
93+
folderId: ${{ secrets.FOLDERID }}
94+
overwrite: "true" # optional boolean

0 commit comments

Comments
 (0)