Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmostafa committed Nov 25, 2024
1 parent 2c810ff commit 623ee18
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ env:
PAT: ${{ secrets.PAT }}

jobs:
build:
build-api:
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./api
steps:
- uses: actions/checkout@v4

Expand All @@ -27,3 +29,22 @@ jobs:

- name: Push Docker Image
run: docker push $IMAGE/api:latest
build-web:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web
steps:
- uses: actions/checkout@v4

- name: Registry login
run: echo $PAT | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin

- name: Pull Docker Image
run: docker pull $IMAGE/web:latest

- name: Tag Docker Image
run: docker build . --tag $IMAGE/web:latest --cache-from $IMAGE:latest

- name: Push Docker Image
run: docker push $IMAGE/web:latest

0 comments on commit 623ee18

Please sign in to comment.