forked from project-openubl/searchpe
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (54 loc) · 1.82 KB
/
azure.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
49
50
51
52
53
54
55
56
57
58
name: Azure cloud
on:
push:
branches:
[ master ]
paths:
- '**'
- '.github/workflows/azure.yml'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
cache: maven
- name: Build container image
run: |
mvn -U -B package --file pom.xml -DskipTests \
-Dquarkus.native.container-build=true \
-Dquarkus.container-image.push=false \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.registry=ghcr.io \
-Dquarkus.container-image.group=project-openubl \
-Dquarkus.container-image.name=searchpe/searchpe \
-Dquarkus.container-image.tag=${{ github.sha }} \
-P native,ui
- name: Login to Ghcr.io
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push images to registry
run: |
docker push ghcr.io/project-openubl/searchpe/searchpe:${{ github.sha }}
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.SEARCHPE_AZURE_CREDENTIALS }}
- name: Deploy to containerapp
uses: azure/CLI@v1
with:
inlineScript: |
az config set extension.use_dynamic_install=yes_without_prompt
az containerapp registry set -n searchpe -g openubl --server ghcr.io --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }}
az containerapp update -n searchpe -g openubl --image ghcr.io/project-openubl/searchpe/searchpe:${{ github.sha }}