41 lines
1.3 KiB
YAML
41 lines
1.3 KiB
YAML
name: Build add-on
|
|
env:
|
|
BUILD_ARGS: "--test"
|
|
MONITORED_FILES: "apparmor.txt build.yaml config.yaml Dockerfile data rootfs"
|
|
on:
|
|
workflow_dispatch:
|
|
release:
|
|
types: [published]
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
name: Build ${{ github.ref }} / ${{ matrix.arch }}
|
|
strategy:
|
|
matrix:
|
|
arch: ["aarch64", "amd64", "armhf", "armv7", "i386"]
|
|
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Get the version
|
|
id: get_version
|
|
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v2.0.0
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Build ${{ steps.get_version.outputs.VERSION }} / ${{ matrix.arch }}
|
|
run: |
|
|
ARCH=${{ matrix.arch }} && \
|
|
BUILD_TAG=${{ steps.get_version.outputs.VERSION }} && \
|
|
docker-compose -f docker-compose.build.yaml build
|
|
|
|
- name: Push ${{ steps.get_version.outputs.VERSION }} / ${{ matrix.arch }}
|
|
run: |
|
|
ARCH=${{ matrix.arch }} && \
|
|
BUILD_TAG=${{ steps.get_version.outputs.VERSION }} && \
|
|
docker-compose -f docker-compose.build.yaml push |