Skip to content

raspberrypi-sys-mods #9

raspberrypi-sys-mods

raspberrypi-sys-mods #9

name: raspberrypi-sys-mods
on: workflow_dispatch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
defaults:
run:
shell: sh
working-directory: /dev/shm
jobs:
build:
# https://github.com/actions/runner-images
runs-on: ubuntu-22.04
steps:
- name: Build package
run: sudo bash -c "$(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/${GITHUB_REF#refs/heads/}/.build/software/raspberrypi-sys-mods/build.bash")"
- name: Upload package
run: |
[ -d ~/.ssh ] || mkdir ~/.ssh
umask 377
echo '${{ secrets.KNOWN_HOSTS }}' > ~/.ssh/known_hosts
echo '${{ secrets.SSH_KEY }}' > ~/.ssh/id_ed25519
curl -T raspberrypi-sys-mods.deb --key ~/.ssh/id_ed25519 '${{ secrets.UPLOAD_URL }}all/'
curl 'https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache' -H 'Authorization: Bearer ${{ secrets.CF_TOKEN }}' -H 'Content-Type: application/json' \
--data '{"files":["https://dietpi.com/downloads/binaries/testing/","https://dietpi.com/downloads/binaries/testing/raspberrypi-sys-mods.deb"]}'