Skip to content
This repository was archived by the owner on Jun 6, 2024. It is now read-only.

Commit d29c135

Browse files
committed
Add deploy job to main branch action
1 parent c499574 commit d29c135

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/docker-build-push.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
branches: ["main"]
66

7+
env:
8+
AZURE_WEBAPP_NAME: "alma-job-runner"
9+
710
jobs:
811
build:
912
runs-on: ubuntu-latest
@@ -34,3 +37,20 @@ jobs:
3437
release_name: ${{ env.RELEASE_VERSION }}
3538
draft: false
3639
prerelease: false
40+
41+
deploy:
42+
runs-on: ubuntu-latest
43+
44+
needs: build
45+
46+
steps:
47+
- name: Set Release version env variable
48+
run: |
49+
echo "RELEASE_VERSION=v$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
50+
- name: Deploy to Azure Web App
51+
id: deploy-to-webapp
52+
uses: azure/webapps-deploy@v2
53+
with:
54+
app-name: ${{ env.AZURE_WEBAPP_NAME }}
55+
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
56+
images: "ghcr.io/hsg-library/alma-job-runner:${{ env.RELEASE_VERSION }}"

0 commit comments

Comments
 (0)