2022-11-04 10:27:43 -04:00
|
|
|
name: Test and Build Latest Container Image
|
|
|
|
|
|
|
|
on:
|
2022-11-25 10:03:34 -05:00
|
|
|
schedule:
|
|
|
|
- cron: "0 10 * * *"
|
2022-11-04 10:27:43 -04:00
|
|
|
push:
|
2022-11-25 10:03:34 -05:00
|
|
|
branches:
|
|
|
|
- "**"
|
|
|
|
tags:
|
|
|
|
- "v*.*.*"
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- "master"
|
2022-11-04 10:27:43 -04:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
tox:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-09-16 11:58:54 -04:00
|
|
|
python-version: ["3.10", "3.11"]
|
2022-11-04 10:27:43 -04:00
|
|
|
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
|
2023-06-22 07:58:35 -04:00
|
|
|
pip install tox tox-gh>=1.2
|
2022-11-04 10:27:43 -04:00
|
|
|
- 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
|
2024-02-07 08:55:24 -05:00
|
|
|
uses: tj-actions/branch-names@v8
|
2022-11-04 10:27:43 -04:00
|
|
|
- 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:
|
2022-11-25 10:08:46 -05:00
|
|
|
context: "{{defaultContext}}:docker"
|
2023-07-20 14:33:59 -04:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2024-05-23 09:59:41 -04:00
|
|
|
file: ./Dockerfile
|
2022-11-25 10:03:34 -05:00
|
|
|
build-args: |
|
2024-05-23 09:59:41 -04:00
|
|
|
INSTALL_TYPE=github
|
2022-11-25 10:03:34 -05:00
|
|
|
BRANCH=${{ steps.branch-name.outputs.current_branch }}
|
2022-12-15 13:05:22 -05:00
|
|
|
BUILDX_QEMU_ENV=true
|
2022-11-04 10:27:43 -04:00
|
|
|
push: true
|
|
|
|
tags: |
|
|
|
|
hemna6969/aprsd:${{ steps.branch-name.outputs.current_branch }}
|