Skip to content
Snippets Groups Projects
Commit 12000fc6 authored by Eugen Ciur's avatar Eugen Ciur
Browse files

add build prod image workflow

parent 8feaa958
Branches
No related tags found
No related merge requests found
name: Build PROD Image
on:
release:
types:
- published
workflow_dispatch:
inputs:
tag:
description: 'Docker image tag'
required: true
jobs:
build-prod-image:
name: Build PROD Image
runs-on: ubuntu-latest
steps:
- 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
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: papermerge/papermerge.js
- name: Build and push with MANUAL tag
uses: docker/build-push-action@v2
if: ${{ github.event.inputs.tag != '' }}
with:
push: true
tags: papermerge/papermerge.js:${{ github.event.inputs.tag }}
file: docker/Dockerfile
- name: Build and push with RELEASE version as tag
uses: docker/build-push-action@v2
if: ${{ github.event.inputs.tag == '' }}
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
file: docker/Dockerfile
labels: ${{ steps.meta.outputs.labels }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment