Skip to content

Commit

Permalink
Develop (Merge): Add GitHub Actions Workflow to Build and Push Docker…
Browse files Browse the repository at this point in the history
… Images

Add GitHub Actions Workflow to Build and Push Docker Images
  • Loading branch information
ktutak1337 authored Jul 26, 2024
2 parents ea3033e + 48e9eaa commit 6b40fbb
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/docker-build-and-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build and publish Docker images

on:
workflow_dispatch:
push:
tags:
- 'v*.*.*'

jobs:
publish-docker:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/[email protected]

- name: Docker Setup QEMU
uses: docker/[email protected]

- name: Docker Setup Buildx
uses: docker/[email protected]

- name: Docker Login
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract version from tag
id: extract_version
run: echo "::set-output name=version::${GITHUB_REF#refs/tags/v}"

- name: Build and push Docker images for web api
uses: docker/[email protected]
with:
context: .
file: docker/webapi/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
stellarchat-api:${{ steps.extract_version.outputs.version }}
stellarchat-api:latest
- name: Build and push Docker images for web app
uses: docker/[email protected]
with:
context: .
file: docker/webapi/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
stellarchat-web:${{ steps.extract_version.outputs.version }}
stellarchat-web:latest

0 comments on commit 6b40fbb

Please sign in to comment.