Skip to content

Commit

Permalink
feat(setup): Add release workflow in cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
thomashermine committed Oct 18, 2023
1 parent 4eb84e1 commit 563e6ed
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
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 Engine Image
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}, ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest

0 comments on commit 563e6ed

Please sign in to comment.