mirror of
https://github.com/craigerl/aprsd.git
synced 2024-11-24 08:58:49 -05:00
Hemna
afeb11a085
This patch reworks the main Dockerfile to do builds for both the pypi upstream release of aprsd as well as the github repo branch of aprsd for development. This eliminates the need for Dockerfile-dev. This patch also installs aprsd as a user in the container image instead of as root.
54 lines
1.5 KiB
YAML
54 lines
1.5 KiB
YAML
name: Manual Build docker container
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
logLevel:
|
|
description: 'Log level'
|
|
required: true
|
|
default: 'warning'
|
|
type: choice
|
|
options:
|
|
- info
|
|
- warning
|
|
- debug
|
|
jobs:
|
|
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Get Branch Name
|
|
id: branch-name
|
|
uses: tj-actions/branch-names@v8
|
|
- 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
|
|
uses: docker/setup-qemu-action@v2
|
|
- name: Setup Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
- name: Login to Docker HUB
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- name: Build the Docker image
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
context: "{{defaultContext}}:docker"
|
|
platforms: linux/amd64,linux/arm64
|
|
file: ./Dockerfile
|
|
build-args: |
|
|
INSTALL_TYPE=github
|
|
BRANCH=${{ steps.extract_branch.outputs.branch }}
|
|
BUILDX_QEMU_ENV=true
|
|
push: true
|
|
tags: |
|
|
hemna6969/aprsd:${{ steps.extract_branch.outputs.branch }}
|