Reformat workflow file
All checks were successful
Keycloak mailcow Build / Build und Bereitstellung (push) Successful in 12s

This commit is contained in:
Denys Konovalov 2024-07-07 11:36:03 +02:00
parent 3facb173c0
commit 4be53c6e7c

@ -1,11 +1,13 @@
name: deploy
name: Keycloak mailcow Build
on:
push:
branches: [ main ]
branches: [main]
pull_request:
jobs:
deploy:
release:
name: Build und Bereitstellung
runs-on: act-runner-user
steps:
- name: Checkout
@ -16,11 +18,13 @@ jobs:
mvn package
- name: Remove old version
if: gitea.event_name == 'push'
run: |
rm -rf /opt/data/keycloak/providers/spring-security-crypto-*.jar
rm -rf /opt/data/keycloak/providers/keycloak-mailcow-*.jar
- name: Deploy
if: gitea.event_name == 'push'
run: |
export SPRINGSEC_VERSION=$(xmlstarlet sel -N x="http://maven.apache.org/POM/4.0.0" -t -m 'x:project/x:properties/x:version.springsec' -v . pom.xml)
curl -sL \
@ -29,14 +33,15 @@ jobs:
export SPI_VERSION=$(xmlstarlet sel -N x="http://maven.apache.org/POM/4.0.0" -t -m 'x:project/x:version' -v . pom.xml)
cp -r target/keycloak-mailcow-$SPI_VERSION.jar /opt/data/keycloak/providers/keycloak-mailcow-$SPI_VERSION.jar
- name: Restart Keycloak
if: gitea.event_name == 'push'
run: |
curl -X POST -H "X-API-KEY: ${{ secrets.PORTAINER_API_KEY }}" https://docker.cantorgymnasium.de/api/stacks/48/stop\?endpointId\=1
curl -X POST -H "X-API-KEY: ${{ secrets.PORTAINER_API_KEY }}" https://docker.cantorgymnasium.de/api/stacks/48/start\?endpointId\=1
- name: Notification
uses: actions/telegram-action@main
if: always()
with:
chat_id: ${{ secrets.TG_CHAT_ID }}
token: ${{ secrets.TG_TOKEN }}
- name: Restart Keycloak
run: |
curl -X POST -H "X-API-KEY: ${{ secrets.PORTAINER_API_KEY }}" https://docker.cantorgymnasium.de/api/stacks/48/stop\?endpointId\=1
curl -X POST -H "X-API-KEY: ${{ secrets.PORTAINER_API_KEY }}" https://docker.cantorgymnasium.de/api/stacks/48/start\?endpointId\=1