Reformat workflow file
All checks were successful
Keycloak mailcow Build / Build und Bereitstellung (push) Successful in 12s
All checks were successful
Keycloak mailcow Build / Build und Bereitstellung (push) Successful in 12s
This commit is contained in:
parent
3facb173c0
commit
4be53c6e7c
@ -1,11 +1,13 @@
|
|||||||
name: deploy
|
name: Keycloak mailcow Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
release:
|
||||||
|
name: Build und Bereitstellung
|
||||||
runs-on: act-runner-user
|
runs-on: act-runner-user
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@ -16,11 +18,13 @@ jobs:
|
|||||||
mvn package
|
mvn package
|
||||||
|
|
||||||
- name: Remove old version
|
- name: Remove old version
|
||||||
|
if: gitea.event_name == 'push'
|
||||||
run: |
|
run: |
|
||||||
rm -rf /opt/data/keycloak/providers/spring-security-crypto-*.jar
|
rm -rf /opt/data/keycloak/providers/spring-security-crypto-*.jar
|
||||||
rm -rf /opt/data/keycloak/providers/keycloak-mailcow-*.jar
|
rm -rf /opt/data/keycloak/providers/keycloak-mailcow-*.jar
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
|
if: gitea.event_name == 'push'
|
||||||
run: |
|
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)
|
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 \
|
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)
|
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
|
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
|
- name: Notification
|
||||||
uses: actions/telegram-action@main
|
uses: actions/telegram-action@main
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
chat_id: ${{ secrets.TG_CHAT_ID }}
|
chat_id: ${{ secrets.TG_CHAT_ID }}
|
||||||
token: ${{ secrets.TG_TOKEN }}
|
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
|
|
Loading…
x
Reference in New Issue
Block a user