-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (47 loc) · 1.69 KB
/
develop.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
on:
push:
branches:
- develop
- main
name: Linux_Container_Workflow
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
# checkout the repo
- name: 'Checkout GitHub Action'
uses: actions/checkout@main
- name: Branch name
run: echo running on branch ${{ github.ref_name }}
# - name: Replace quarkus.mongodb.connection-string
# uses: nightstory/replace-env@v1
# with:
# input_file: './src/main/resources/application.properties'
# env:
# MONGODB_CONNECTION_STRING: ${{ secrets.DEV_MONGODB_CONNECTION_STRING }}
# - name: Replace quarkus.mongodb.connection-string
# uses: nightstory/replace-env@v1
# with:
# input_file: './src/main/resources/application.properties'
# env:
# MONGODB_DATABASE_NAME: 'weather'
# - name: Replace quarkus.mongodb.connection-string
# uses: nightstory/replace-env@v1
# with:
# input_file: './src/main/resources/application.properties'
# env:
# WEATHER_API_KEY: ${{ secrets.WEATHER_API_KEY }}
- uses: actions/setup-java@v1
with:
java-version: 17
- name: 'Build and push image'
uses: azure/docker-login@v1
with:
login-server: ${{ secrets.REGISTRY_PATH }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- run: |
cd backend
mvn package -DskipTests
docker build -f src/main/docker/Dockerfile.jvm -t ${{ secrets.REGISTRY_PATH }}/volcampanion-api:${{ github.ref_name }} .
docker push ${{ secrets.REGISTRY_PATH }}/volcampanion-api:${{ github.ref_name }}