-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (38 loc) · 1.33 KB
/
release.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
43
44
---
name: Release
# This workflow runs when a push is made on /develop or /master, or manually trought the web UI.
# It will build and push the Docker image to the GitHub Docker Registry.
on:
workflow_dispatch:
push:
branches:
- main
- develop
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/assistant
jobs:
build_push:
name: 🚀 Build & Push
runs-on: ubuntu-latest
steps:
# Setup
# ============================================================================================
- name: ⚙️ Setup — QEMU
uses: docker/setup-qemu-action@v1
- name: ⚙️ Setup — Docker Buildx
uses: docker/setup-buildx-action@v2
- name: ⚙️ Setup — GitHub Docker Registry Login
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Build
# ============================================================================================
- name: ⚒️ Build & Push Image
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}, ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
platforms: linux/amd64,linux/arm64