1
0
mirror of https://github.com/craigerl/aprsd.git synced 2024-11-13 20:01:48 -05:00
aprsd/.github/workflows/master-build.yml

62 lines
1.5 KiB
YAML
Raw Normal View History

name: Test and Build Latest Container Image
on:
2022-11-25 10:03:34 -05:00
schedule:
- cron: "0 10 * * *"
push:
2022-11-25 10:03:34 -05:00
branches:
- "**"
tags:
- "v*.*.*"
pull_request:
branches:
- "master"
jobs:
tox:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox
build:
needs: tox
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get Branch Name
id: branch-name
uses: tj-actions/branch-names@v6
- 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: ./docker
platforms: linux/amd64,linux/arm64,linux/arm/v7
2022-11-25 10:03:34 -05:00
file: Dockerfile-dev
build-args: |
BRANCH=${{ steps.branch-name.outputs.current_branch }}
push: true
tags: |
hemna6969/aprsd:${{ steps.branch-name.outputs.current_branch }}