Skip to content

Commit

Permalink
update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ledouxm committed Apr 10, 2024
1 parent f34b651 commit 2a6d670
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
name: Create and publish a Docker image
name: Build frontend and backend images and push to ghcr.io

on:
push:
Expand All @@ -10,8 +10,12 @@ env:
IMAGE_NAME: ${{ github.repository }}

jobs:
login:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
#
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -22,12 +26,6 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

build-and-push-backend:
runs-on: ubuntu-latest
needs: login
permissions:
packages: write
steps:
- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
Expand All @@ -36,12 +34,6 @@ jobs:
target: backend
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-backend:latest

build-and-push-frontend:
runs-on: ubuntu-latest
needs: login
permissions:
packages: write
steps:
- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
Expand Down

0 comments on commit 2a6d670

Please sign in to comment.