1
0
mirror of https://github.com/craigerl/aprsd.git synced 2025-05-24 10:32:25 -04:00

update manual build github

This commit is contained in:
Hemna 2023-07-17 11:46:54 -04:00
parent 0c179005ee
commit fa6e738a20
2 changed files with 17 additions and 5 deletions

View File

@ -1,4 +1,4 @@
name: Manual master-dev docker container name: Manual Build docker container
on: on:
workflow_dispatch: workflow_dispatch:
@ -14,13 +14,21 @@ on:
- debug - debug
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Get Branch Name - name: Get Branch Name
id: branch-name id: branch-name
uses: tj-actions/branch-names@v6 uses: tj-actions/branch-names@v7
- name: Extract Branch
id: extract_branch
run: |
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
- name: What is the selected branch?
run: |
echo "Selected Branch '${{ steps.extract_branch.outputs.branch }}'"
- name: Setup QEMU - name: Setup QEMU
uses: docker/setup-qemu-action@v2 uses: docker/setup-qemu-action@v2
- name: Setup Docker Buildx - name: Setup Docker Buildx
@ -37,8 +45,8 @@ jobs:
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
file: ./Dockerfile-dev file: ./Dockerfile-dev
build-args: | build-args: |
BRANCH=master BRANCH=${{ steps.extract_branch.outputs.branch }}
BUILDX_QEMU_ENV=true BUILDX_QEMU_ENV=true
push: true push: true
tags: | tags: |
hemna6969/aprsd:master-dev hemna6969/aprsd:${{ steps.extract_branch.outputs.branch }}

View File

@ -1,5 +1,9 @@
FROM python:3.11-slim as build FROM python:3.11-slim as build
ARG BRANCH=master
ARG BUILDX_QEMU_ENV
ENV APRSD_BRANCH=${BRANCH:-master}
ENV PIP_DEFAULT_TIMEOUT=100 \ ENV PIP_DEFAULT_TIMEOUT=100 \
# Allow statements and log messages to immediately appear # Allow statements and log messages to immediately appear
PYTHONUNBUFFERED=1 \ PYTHONUNBUFFERED=1 \
@ -28,7 +32,7 @@ RUN set -ex \
### Final stage ### Final stage
FROM build as final FROM build as final
RUN git clone https://github.com/craigerl/aprsd RUN git clone -b $APRSD_BRANCH https://github.com/craigerl/aprsd
RUN cd aprsd && pip install --no-cache-dir . RUN cd aprsd && pip install --no-cache-dir .
RUN pip install gunicorn RUN pip install gunicorn
RUN which aprsd RUN which aprsd