Skip to content

test

test #75

Workflow file for this run

name: dev build
on:
push:
branches:
- main
- master
jobs:
build-push:
strategy:
matrix:
include:
- target: controller
dockerfile: package/Dockerfile.controller
platforms: linux/amd64,linux/arm64
- target: enforcer
dockerfile: package/Dockerfile.enforcer
platforms: linux/amd64,linux/arm64
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Checkout code
uses: actions/checkout@v4
- name: Create builder
run: make buildx-machine
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
file: ${{ matrix.dockerfile }}
tags: ${{ secrets.DEV_BUILD_REPOSITORY }}/${{ matrix.target }}:${{github.run_number}}
build-args: |
COMMIT=${{ github.sha }}
VERSION=${{ github.ref_name }}
platforms: ${{ matrix.platforms }}
- name: Retag
run: |
docker buildx imagetools create -t ${{ secrets.DEV_BUILD_REPOSITORY }}/${{ matrix.target }}:latest ${{ secrets.DEV_BUILD_REPOSITORY }}/${{ matrix.target }}:${{github.run_number}}