Merge pull request #7 from m0wer/ci/build_for_arm

Ci/build for arm
This commit is contained in:
m0wer 2021-11-26 21:18:35 +03:00 committed by GitHub
commit a378b10a57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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,26 @@ 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 QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- 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 +47,18 @@ 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 }}