Merge pull request #54 from atlarge-research/fzovpec/15-04-24/Chat-Cl… #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release docker image | |
on: | |
push: | |
branches: | |
- 'main' | |
workflow_dispatch: | |
inputs: | |
imageTag: | |
description: 'Docker Image tag' | |
required: true | |
default: 'latest' | |
type: string | |
env: | |
DEV_TAG: dev | |
concurrency: | |
group: ${{ github.event_name }} | |
cancel-in-progress: true | |
jobs: | |
build_and_release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repo | |
uses: actions/checkout@v2 | |
- name: Setup QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Setup Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build image and push | |
uses: docker/build-push-action@v3 | |
env: | |
IMAGE_TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.imageTag || env.DEV_TAG }} | |
with: | |
context: . | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
tags: ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }} |