Skip to content

Package Updates, downgrade to Py3.11 for Pydantic compatibility issue. Fixes #13 #28

Package Updates, downgrade to Py3.11 for Pydantic compatibility issue. Fixes #13

Package Updates, downgrade to Py3.11 for Pydantic compatibility issue. Fixes #13 #28

name: "Test build of image when Dockerfile is changed"
on:
push:
paths:
- 'Dockerfile'
branches-ignore:
- master
pull_request:
paths:
- 'Dockerfile'
workflow_dispatch:
jobs:
rebuild-container:
name: "Build image with cache"
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3.0.0
with:
platforms: linux/arm64
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.1.0
-
name: Checkout repository
uses: actions/checkout@v4
-
name: Set lower case owner name
run: |
echo "REPOSITORY_OWNER_LC=${OWNER@L}" >>${GITHUB_ENV}
env:
OWNER: '${{ github.repository_owner }}'
-
name: Create .env config file
run: |
cp phoenixd-lnurl.env.example phoenixd-lnurl.env
-
name: Build x86_64 image
id: docker_build_amd64
uses: docker/build-push-action@v5.2.0
with:
context: '.'
push: false
load: true
platforms: linux/amd64
tags: phoenixd-lnurl:test
cache-from: type=registry,ref=ghcr.io/${{ env.REPOSITORY_OWNER_LC }}/phoenixd-lnurl:latest
-
name: Test-run x86_64 image
run: |
docker run --rm phoenixd-lnurl:test &
PID=$!
sleep 10
kill -SIGINT $PID # this will return a non-zero exit code if the container dies early on
-
name: Build ARMv8 image
id: docker_build_arm64
uses: docker/build-push-action@v5.3.0
with:
context: '.'
push: false
load: true
platforms: linux/arm64
tags: phoenixd-lnurl:test
cache-from: type=registry,ref=ghcr.io/${{ env.REPOSITORY_OWNER_LC }}/phoenixd-lnurl:latest