From 9ce34e69ea5f56f364d2600d92192d6c92ad3e90 Mon Sep 17 00:00:00 2001 From: Antonio Navarro Perez Date: Sun, 4 Apr 2021 21:00:21 +0200 Subject: [PATCH] Update docker workflow (#50) --- .github/workflows/docker.yaml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 7528eb3..7d16253 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -5,7 +5,7 @@ on: branches: - master tags: - - '*' + - 'v*' jobs: main: @@ -15,11 +15,15 @@ jobs: uses: actions/checkout@v2 - name: Docker meta - id: docker_meta + id: meta uses: crazy-max/ghaction-docker-meta@v2.1.1 with: images: distribyted/distribyted - tag-sha: true + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} - name: Set up QEMU uses: docker/setup-qemu-action@v1 @@ -37,9 +41,10 @@ jobs: id: docker_build uses: docker/build-push-action@v2 with: - push: true - tags: ${{ steps.docker_meta.outputs.tags }} - labels: ${{ steps.docker_meta.outputs.labels }} + context: . + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 - name: Update repo description