Skip to content

Commit

Permalink
Create deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
bufanoc authored Dec 23, 2024
1 parent 5eb5b4a commit fb561ce
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy

on:
push:
tags:
- 'v*'

jobs:
build-and-push:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3

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

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

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Frontend
uses: docker/build-push-action@v4
with:
context: frontend
push: true
tags: |
ghcr.io/${{ github.repository }}/frontend:latest
ghcr.io/${{ github.repository }}/frontend:${{ github.sha }}
- name: Build and push Backend
uses: docker/build-push-action@v4
with:
context: .
file: backend/Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository }}/backend:latest
ghcr.io/${{ github.repository }}/backend:${{ github.sha }}

0 comments on commit fb561ce

Please sign in to comment.