Skip to content

Merge pull request #86 from p4lang/dependabot/pip/packages/p4pi-web/d… #26

Merge pull request #86 from p4lang/dependabot/pip/packages/p4pi-web/d…

Merge pull request #86 from p4lang/dependabot/pip/packages/p4pi-web/d… #26

Workflow file for this run

name: Build image on push or PR
on:
push:
branches:
- master
paths:
- 'pi-gen/**'
- 'packages/**'
- '.github/workflows/on-push.yml'
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: pi-gen
steps:
- uses: actions/checkout@v3
- name: Register binfmt_misc entries
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Run build script
run: sudo PIGEN_DOCKER_OPTS="-e DEPLOY_XZ=1" ./build-docker.sh
- name: List deploy directory
run: ls -al deploy/
- name: Set image name
run: |
IMAGE_NAME="p4pi-$(date +'%Y-%m-%d')-$(git rev-parse --short=8 HEAD)"
echo "IMAGE_NAME=$IMAGE_NAME" >> $GITHUB_ENV
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.IMAGE_NAME }}
path: pi-gen/deploy/*.zip
if-no-files-found: error
retention-days: 90