add docker build action

This commit is contained in:
Laura Batalha 2025-05-03 21:17:53 +01:00
parent 9b7140e650
commit a00af33010
No known key found for this signature in database
GPG key ID: FF87260D8C08DA64
3 changed files with 31 additions and 18 deletions

View file

@ -94,3 +94,30 @@ jobs:
generate_release_notes: true generate_release_notes: true
prerelease: ${{ contains(github.ref, '-') }} prerelease: ${{ contains(github.ref, '-') }}
fail_on_unmatched_files: true fail_on_unmatched_files: true
build-containers-release:
needs: release
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
environment: ${{ contains(github.ref, '-') && 'development' || 'production' }}
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: .artifacts
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6, linux/386, linux/ppc64le, linux/s390x, linux/riscv64
push: true
tags: lbatalha/reticulum:${{ github.ref_name }}

View file

@ -1,14 +0,0 @@
FROM python:3.13-alpine
RUN pip --no-cache-dir --disable-pip-version-check --no-input -q install rns
RUN mkdir /config
RUN addgroup -S rns --gid 1000 && adduser -S rns --uid 1000 -G rns
RUN chown rns:rns /config
USER rns:rns
VOLUME ["/config"]
ENTRYPOINT ["/usr/local/bin/rnsd", "--config", "/config"]

View file

@ -1,6 +1,6 @@
FROM python:3.13-alpine FROM python:3.13-alpine
ADD dist/rns-*.whl /tmp/ ADD .artifacts/package/rns-*.whl /tmp/
ENV PIP_ROOT_USER_ACTION=ignore ENV PIP_ROOT_USER_ACTION=ignore
ENV PIP_DISABLE_PIP_VERSION_CHECK=1 ENV PIP_DISABLE_PIP_VERSION_CHECK=1