-
Notifications
You must be signed in to change notification settings - Fork 109
33 lines (28 loc) · 1.16 KB
/
api-gateway-pipeline-dev-push.yml
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
name: Develop, on PUSH Java CI/CD of api-gateway-ecommerce-boot, ecommerce-microservice-backend app
on:
push:
branches: [ develop ]
jobs:
build_push:
#needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Setup env variables for Docker
run: echo Setup env variables for Docker
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
- name: Docker Login
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: Build Docker image for api-gateway-ecommerce-boot Microservice
run: docker build -f api-gateway/Dockerfile -t ${{ secrets.DOCKER_USERNAME }}/api-gateway-ecommerce-boot:${{ secrets.PROJECT_VERSION }}dev .
- name: Push api-gateway-ecommerce-boot image
run: docker push ${{ secrets.DOCKER_USERNAME }}/api-gateway-ecommerce-boot:${{ secrets.PROJECT_VERSION }}dev