Skip to content

OPQ

OPQ #40

Workflow file for this run

name: docker
on:
release:
types: [ published ]
workflow_dispatch:
inputs:
version:
description: 'Version (No "v")'
required: true
type: string
jobs:
build-image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log into registry
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Get Version
id: get_version
uses: battila7/[email protected]
- name: Build and push ( manual )
if: ${{ inputs.version }}
id: docker_build_manual
uses: docker/build-push-action@v4
with:
context: .
build-args: |
version=${{ inputs.version }}
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/386
tags: opqofficial/opq:latest,${{ format('opqofficial/opq:v{0}', inputs.version) }}
- name: Build and push
if: success() && startsWith(github.ref, 'refs/tags/')
id: docker_build_auto
uses: docker/build-push-action@v4
with:
build-args: |
version=${{ steps.get_version.outputs.version-without-v }}
context: .
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/386
tags: opqofficial/opq:latest,${{ format('opqofficial/opq:v{0}', steps.get_version.outputs.version-without-v) }}