Skip to content

Commit

Permalink
Deploy to Azure Cloud CI
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosthe19916 committed May 11, 2022
1 parent 662022d commit 26258b5
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 60 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/azure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
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: 11
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
- uses: docker/login-action@v1
with:
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
az containerapp update -n searchpe -g openubl --image ghcr.io/project-openubl/searchpe/searchpe:${{ github.sha }}

This file was deleted.

0 comments on commit 26258b5

Please sign in to comment.