Merge pull request #196 from EatPrilosec/fixbuild

Fix build
This commit is contained in:
Jayofelony
2024-08-25 22:13:21 +02:00
committed by GitHub
3 changed files with 25 additions and 28 deletions

View File

@ -2,48 +2,47 @@ name: Publish
on: on:
workflow_dispatch: workflow_dispatch:
inputs:
version:
description: 'Version number'
required: true
jobs: jobs:
build: build:
name: ${{ matrix.name }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: "Raspberry Pi 32-bit"
id: "32bit"
- name: "Raspberry Pi 64-bit"
id: "64bit"
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with:
path: publish/build
- name: Extract version from file - name: Extract version from file
id: get_version id: get_version
run: | run: |
VERSION=$(cut -d "'" -f2 < pwnagotchi/_version.py) VERSION=$(cut -d "'" -f2 < publish/build/pwnagotchi/_version.py)
echo "VERSION=$VERSION" >> $GITHUB_ENV echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Install qemu dependencies - name: Install qemu dependencies
run: sudo apt update && sudo apt install qemu-user-static qemu-utils xz-utils -y run: sudo apt update && sudo apt install qemu-user-static qemu-utils xz-utils -y
- name: Build img file - name: Build ${{ matrix.name }} img file
run: ls -la .; pwd; make all run: cd publish/build; ls -la .; pwd; make packer; make ${{ matrix.id }}
- name: Transfer 32bit.img to docker and give permissions - name: Change name of .img.xz to add version
run: sudo chown runner:docker "pwnagotchi-32bit.img" run: |
sudo chown runner:docker "pwnagotchi-${{ matrix.id }}.img"
- name: Transfer 64bit.img to docker and give permissions mv "pwnagotchi-${{ matrix.id }}.img" "pwnagotchi-${{ env.VERSION }}-${{ matrix.id }}.img"
run: sudo chown runner:docker "pwnagotchi-64bit.img"
- name: PiShrink - name: PiShrink
run: | run: |
wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh
chmod +x pishrink.sh chmod +x pishrink.sh
sudo mv pishrink.sh /usr/local/bin sudo mv pishrink.sh /usr/local/bin
find /home/runner/work/ -type f -name "*.img" -exec sudo pishrink.sh -aZ {} \; sudo pishrink.sh -aZ "pwnagotchi-${{ env.VERSION }}-${{ matrix.id }}.img"
- name: Change name of 32.img.xz to add version
run: mv "pwnagotchi-32bit.img.xz" "pwnagotchi-$VERSION-32bit.img.xz"
- name: Change name of 64.img.xz to add version
run: mv "pwnagotchi-64bit.img.xz" "pwnagotchi-$VERSION-64bit.img.xz"
- name: Release - name: Release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
@ -52,7 +51,5 @@ jobs:
make_latest: true make_latest: true
tag_name: v${{ env.VERSION }} tag_name: v${{ env.VERSION }}
name: Pwnagotchi v${{ env.VERSION }} name: Pwnagotchi v${{ env.VERSION }}
files: | files: pwnagotchi-${{ env.VERSION }}-${{ matrix.id }}.img.xz
pwnagotchi-${{ env.VERSION }}-32bit.img.xz
pwnagotchi-${{ env.VERSION }}-64bit.img.xz
generate_release_notes: true generate_release_notes: true

View File

@ -90,7 +90,7 @@
- libopenblas-dev # https://stackoverflow.com/questions/14570011/explain-why-numpy-should-not-be-imported-from-source-directory - libopenblas-dev # https://stackoverflow.com/questions/14570011/explain-why-numpy-should-not-be-imported-from-source-directory
- libopenjp2-7 - libopenjp2-7
- libpcap-dev - libpcap-dev
- libraspberrypi-bin #- libraspberrypi-bin ## seems to be provided by raspi-utils now
- libraspberrypi-dev - libraspberrypi-dev
- libraspberrypi-doc - libraspberrypi-doc
- libraspberrypi0 - libraspberrypi0

View File

@ -83,7 +83,7 @@
- libgmp3-dev - libgmp3-dev
- libnetfilter-queue-dev - libnetfilter-queue-dev
- libpcap-dev - libpcap-dev
- libraspberrypi-bin #- libraspberrypi-bin ## seems to be provided by raspi-utils now
- libraspberrypi-dev - libraspberrypi-dev
- libraspberrypi-doc - libraspberrypi-doc
- libraspberrypi0 - libraspberrypi0