name: deploy on: push: branches: [ main ] jobs: release-image: runs-on: act-runner-user env: DOCKER_ORG: gcg DOCKER_LATEST: latest steps: - name: Checkout uses: https://github.com/actions/checkout@v4 - name: Build run: | mvn package - name: Remove old version run: | rm -rf /opt/data/keycloak/providers/spring-security-crypto-*.jar rm -rf /opt/data/keycloak/providers/keycloak-mailcow-*.jar - name: Deploy 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 --output \ https://repo1.maven.org/maven2/org/springframework/security/spring-security-crypto/$SPRINGSEC_VERSION/spring-security-crypto-$SPRINGSEC_VERSION.jar /opt/data/keycloak/providers/spring-security-crypto-$SPRINGSEC_VERSION.jar 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-$KEYCLOAK_VERSION.jar /opt/data/keycloak/providers/keycloak-mailcow-$KEYCLOAK_VERSION.jar - name: Notification uses: actions/telegram-action@main if: always() with: chat_id: ${{ secrets.TG_CHAT_ID }} token: ${{ secrets.TG_TOKEN }} - name: Trigger Stack Webhook run: | curl -X POST https://docker.cantorgymnasium.de/api/stacks/webhooks/7f03c15f-dcf2-47cf-938e-6502b8520923