-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (26 loc) · 923 Bytes
/
Copy pathapp-develop-pipeline.yaml
File metadata and controls
33 lines (26 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: develop pipeline clean, package and push to ghcr
on:
push:
branches:
- 'develop'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
- name: Build with Maven
run: mvn clean package -DskipTests
- name: Log in to GitHub Container Registry
run: echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build and Push Docker Image
run: |
for service in user-service order-service product-service; do
docker build -t ghcr.io/${{ github.repository_owner }}/$service:latest ./$service
docker push ghcr.io/${{ github.repository_owner }}/$service:latest
done