Skip to content

ci: try to fix r4 kernel download #14

ci: try to fix r4 kernel download

ci: try to fix r4 kernel download #14

Workflow file for this run

# .github/workflows/main.yml
name: Main
on:
push:
branches:
- 'main'
- 'gdrive-test'
workflow_dispatch:
jobs:
gdrive-upload:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup env
run: |
echo "DT=$(date +'%Y-%m-%d_%H%M')" >> $GITHUB_ENV
echo "DISTRO=bookworm" >> $GITHUB_ENV
- name: Setup cache
id: cache
uses: actions/cache@v4
with:
path: "${{ env.DISTRO }}_*.tar.gz"
key: ${{ runner.os }}-chroot
restore-keys: ${{ runner.os }}-chroot
- name: Acquire Google access token for file download
id: google-access-token
uses: playeveryware/action-google-access-token@v1
with:
credentials: ${{ secrets.CREDENTIALS_RAW }}
scope: 'https://www.googleapis.com/auth/drive.readonly'
- name: Install depencies
run: |
sudo apt update
sudo apt install python3 parted qemu-user-static debootstrap binfmt-support
- name: Build R64 Debian ${{ env.DISTRO }} Image
run: |
./buildimg.sh bpi-r64 ${{ env.DISTRO }}
- name: Build R2Pro Debian ${{ env.DISTRO }} Image
run: |
./buildimg.sh bpi-r2pro ${{ env.DISTRO }}
- name: Build R3 Debian ${{ env.DISTRO }} Image
run: |
./buildimg.sh bpi-r3 ${{ env.DISTRO }}
- name: Download BPI-R4 kernel file
uses: playeveryware/action-google-drive-download@v1
with:
token: ${{ steps.google-access-token.outputs.token }}
file-id: 14IPr6_h0_NEe8ute6HXMUNACnHiaaab4
path: bpi-r4-kernel.tar.gz
#uses: satackey/action-google-drive@v1
#with:
# skicka-tokencache-json: ${{ secrets.CREDENTIALS_RAW }}
# download-from: https://drive.google.com/file/d/14IPr6_h0_NEe8ute6HXMUNACnHiaaab4/view?usp=drive_link
# download-to: ./bpi-r4-kernel.tar.gz
- name: Build R4 Debian ${{ env.DISTRO }} Image
run: |
echo -e "skipkerneldownload=1\nkernelfile=bpi-r4-kernel.tar.gz" > sourcefiles_bpi-r4.conf
./buildimg.sh bpi-r4 ${{ env.DISTRO }}
#- name: Upload to Google Drive
# uses: Jodebu/upload-to-drive@master
# with:
# target: bpi-r3
# credentials: ${{ secrets.CREDENTIALS }}
# folder: ${{ secrets.FOLDERID }}
- name: Upload to gdrive
uses: adityak74/google-drive-upload-git-action@main
with:
credentials: ${{ secrets.CREDENTIALS }}
filename: "*.img.gz"
folderId: ${{ secrets.FOLDERID }}
overwrite: "true" # optional boolean