-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Develop (Merge): Add GitHub Actions Workflow to Build and Push Docker…
… Images Add GitHub Actions Workflow to Build and Push Docker Images
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
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
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 |