ci(docker): build for arm

This commit is contained in:
m0wer 2021-11-26 21:07:53 +03:00
parent c71a3fcd89
commit f7bbe5cc1c
No known key found for this signature in database
GPG key ID: 30B4ECB4ECEEF686

View file

@ -1,8 +1,9 @@
---
name: docker
on:
schedule:
- cron: '0 3 5 * *' # every friday at 3am
- cron: 0 3 5 * * # every friday at 3am
push:
branches:
- '**'
@ -10,21 +11,18 @@ on:
- '*.*.*'
pull_request:
branches:
- 'master'
- master
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v2
-
name: Set up dynamic build ARGs
- name: Set up dynamic build ARGs
id: getargs
run: echo "::set-output name=version::$(cat ./stable/VERSION)"
-
name: Docker meta
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
@ -41,18 +39,16 @@ jobs:
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
-
name: Login to DockerHub
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
- name: Build and push
uses: docker/build-push-action@v2
with:
platforms: linux/amd64
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}