diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9cf0727..82e82d8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,12 +2,12 @@ name: Build Reticulum on: push: - branches: + branches: - '*' tags: - "[0-9]+.[0-9]+.[0-9]+*" pull_request: - branches: + branches: - master paths-ignore: - .gitignore @@ -16,7 +16,7 @@ on: permissions: contents: write -concurrency: +concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true @@ -94,3 +94,30 @@ jobs: generate_release_notes: true prerelease: ${{ contains(github.ref, '-') }} 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 }} diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 32da7e0..0000000 --- a/Dockerfile +++ /dev/null @@ -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"] diff --git a/docker/Dockerfile.dist b/docker/Dockerfile.dist index c99d314..0406a65 100644 --- a/docker/Dockerfile.dist +++ b/docker/Dockerfile.dist @@ -1,6 +1,6 @@ FROM python:3.13-alpine -ADD dist/rns-*.whl /tmp/ +ADD .artifacts/package/rns-*.whl /tmp/ ENV PIP_ROOT_USER_ACTION=ignore ENV PIP_DISABLE_PIP_VERSION_CHECK=1