Add multiarch build to workflow

This commit is contained in:
Jack O'Sullivan 2021-06-10 19:02:29 +01:00
parent 66db1654d8
commit e62d1b19e3

View File

@ -9,15 +9,20 @@ jobs:
docker:
runs-on: ubuntu-20.04
env:
PLATFORMS: linux/amd64,linux/386,linux/arm64,linux/arm/v7
steps:
- uses: actions/checkout@v2
- name: Log into GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Install script dependencies
run: pip3 install -r scripts/requirements.txt
- id: vars
name: Generate build vars
@ -26,7 +31,10 @@ jobs:
echo "::set-output name=tag::"${SHA:0:8}-$(date +%s)Z""
- name: Build
run: make PLUGIN_TAG=${{ steps.vars.outputs.tag }} plugin
run: make PLUGIN_TAG=${{ steps.vars.outputs.tag }} multiarch
- name: Push
run: make PLUGIN_TAG=${{ steps.vars.outputs.tag }} push
env:
REGISTRY_USERNAME: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: make PLUGIN_TAG=${{ steps.vars.outputs.tag }} push-multiarch