Skip to content

3.0.9

3.0.9 #10

Workflow file for this run

name: docker releases
on:
push:
branches-ignore:
- '**'
tags:
- '**'
workflow_dispatch:
inputs:
platform:
description: 'Platform'
default: 'linux/amd64,linux/arm64/v8'
required: false
jobs:
docker:
name: "Docker Image"
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v3
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v4
with:
images: |
wipac/mou-dashboard-services
tags: |
# branches (PRs)
type=sha,prefix={{branch}}-,enable=${{ github.ref_type == 'branch' }}
# release tags
type=semver,pattern={{major}},enable=${{ github.ref_type == 'tag' }}
type=semver,pattern={{major}}.{{minor}},enable=${{ github.ref_type == 'tag' }}
type=semver,pattern={{major}}.{{minor}}.{{patch}},enable=${{ github.ref_type == 'tag' }}
- name: Login to Docker Hub
uses: docker/login-action@v2
if: ${{ github.event_name != 'pull_request' }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
if: ${{ contains(github.event.inputs.platform || 'linux/amd64', 'arm') }}
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Push Docker Image X86_64
# if: ${{ arch != 'arm' }}
uses: docker/build-push-action@v3
with:
context: .
platforms: ${{ github.event.inputs.platform || 'linux/amd64' }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
# -
# name: Push Docker Image
# if: ${{ arch == 'arm' }}
# uses: docker/build-push-action@v3
# with:
# context: .
# platforms: linux/amd64,linux/arm64/v8
# push: ${{ github.event_name != 'pull_request' }}
# tags: ${{ steps.docker_meta.outputs.tags }}
# labels: ${{ steps.docker_meta.outputs.labels }}