-
Notifications
You must be signed in to change notification settings - Fork 32
42 lines (35 loc) · 1.02 KB
/
on-push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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@v4
- 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@v4
with:
name: ${{ env.IMAGE_NAME }}
path: pi-gen/deploy/*.zip
if-no-files-found: error
retention-days: 90