Skip to content

Commit

Permalink
chore: add CD workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
skgndi12 committed Apr 14, 2024
1 parent ee44b7d commit 3b3417f
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/image-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Build and push images

on:
push:
tags:
- "v*.*.*"

jobs:
build-api:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: |
.github
api
fetch-depth: 1

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: mistercinephile/mrc-api:${{ github.ref_name }}
context: api

build-ui:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: |
.github
ui
fetch-depth: 1

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: mistercinephile/mrc-ui:${{ github.ref_name }}
context: ui

0 comments on commit 3b3417f

Please sign in to comment.