Skip to content

build birdnetpi docker #17

build birdnetpi docker

build birdnetpi docker #17

Workflow file for this run

name: build birdnetpi docker
on:
workflow_dispatch:
env:
REGISTRY: ghcr.io
# IMAGE_NAME: ${{ github.repository }}
IMAGE_NAME: srd424/birdnetpi-amd64
jobs:
builder-build:
runs-on: ubuntu-20.04
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: cache build cache
uses: actions/cache@v3
with:
path: cache
key: bnpi0-main
restore-keys: |
bnpi0-main
bnpi0-
bnpi
- name: Build with buildah
run: mkdir -p cache/pip cache/apt && buildah bud \
-v $PWD/cache/apt:/var/cache/apt/archives \
-v $PWD/cache/pip:/home/pi/.cache/pip \
--tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} .
- name: fix cache ownership
run: sudo bash -c "chown -v -R \$SUDO_USER cache"
- name: Log in to the Container registry
uses: redhat-actions/podman-login@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish image
run: podman push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}