Skip to content

Commit

Permalink
reduce number of plattforms in normal push
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanSchoof committed Apr 6, 2021
1 parent ee88431 commit ba1cac9
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
name: docker

on: [push, pull_request]
on:
push:
branches:
- master

jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2
- name: Set versions env var
run: sed -n -e 's/.*\(VZLOGGER_.*_VERSION\) \+\([0-9]\+\).*/\1=\2/p' CMakeLists.txt >> $GITHUB_ENV
- name: Set env sha short
run: echo "GITHUB_SHA_SHORT=$(echo $GITHUB_SHA | cut -c 1-6)" >> $GITHUB_ENV
run: echo "GITHUB_SHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build
uses: docker/build-push-action@v2
with:
push: ${{ github.ref == 'refs/heads/master' }}
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
push: true
platforms: linux/amd64,linux/arm/v6
tags: ${{ env.image_name }}:commit-${{ env.GITHUB_SHA_SHORT }}, ${{ env.image_name }}:${{ env.VZLOGGER_MAJOR_VERSION }}.${{ env.VZLOGGER_MINOR_VERSION }}.${{ env.VZLOGGER_SUB_VERSION }}, ${{ env.image_name }}:${{ env.VZLOGGER_MAJOR_VERSION }}.${{ env.VZLOGGER_MINOR_VERSION }}, ${{ env.image_name }}:${{ env.VZLOGGER_MAJOR_VERSION }}, ${{ env.image_name }}:latest
env:
image_name: ${{ secrets.DOCKERHUB_USERNAME }}/vzlogger

0 comments on commit ba1cac9

Please sign in to comment.