Skip to content

Commit 00f0d21

Browse files
committed
fix pipeline
1 parent a5ac898 commit 00f0d21

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

.github/workflows/deploy.yaml

+18-16
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@ on:
55
branches: [main]
66

77
jobs:
8-
prepare:
8+
build-and-deploy-frontend:
99
runs-on: ubuntu-latest
10-
outputs:
11-
code: ${{ steps.checkout.outputs.sha }}
10+
1211
steps:
1312
- name: Checkout code
14-
id: checkout
1513
uses: actions/checkout@v2
1614

1715
- name: Login to GitHub Container Registry
@@ -21,11 +19,7 @@ jobs:
2119
username: ${{ github.actor }}
2220
password: ${{ secrets.GITHUB_TOKEN }}
2321

24-
build-and-push-frontend:
25-
runs-on: ubuntu-latest
26-
needs: prepare
27-
steps:
28-
- name: Docker meta for frontend
22+
- name: Docker meta
2923
id: meta-frontend
3024
uses: docker/metadata-action@v4
3125
with:
@@ -40,14 +34,23 @@ jobs:
4034
push: true
4135
tags: ${{ steps.meta-frontend.outputs.tags }}
4236

43-
build-and-push-backend:
37+
38+
build-and-deploy-backend:
4439
runs-on: ubuntu-latest
45-
needs: prepare
40+
needs: build-and-deploy-frontend
41+
4642
steps:
47-
- name: Use prepared code
48-
run: echo "Using code checked out in the prepare stage"
43+
- name: Checkout code
44+
uses: actions/checkout@v2
4945

50-
- name: Docker meta for backend
46+
- name: Login to GitHub Container Registry
47+
uses: docker/login-action@v3
48+
with:
49+
registry: ghcr.io
50+
username: ${{ github.actor }}
51+
password: ${{ secrets.GITHUB_TOKEN }}
52+
53+
- name: Docker meta
5154
id: meta-backend
5255
uses: docker/metadata-action@v4
5356
with:
@@ -60,5 +63,4 @@ jobs:
6063
context: .
6164
file: ./backend/Dockerfile
6265
push: true
63-
tags: ${{ steps.meta-backend.outputs.tags }}
64-
66+
tags: ${{ steps.meta-backend.outputs.tags }}

0 commit comments

Comments
 (0)