-
Notifications
You must be signed in to change notification settings - Fork 23
42 lines (42 loc) · 1.14 KB
/
release-docker-images.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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 }}