This repository was archived by the owner on Aug 21, 2025. It is now read-only.
1.3.9 - new k3s cluster and update libs #79
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish to Maven & Build Production FunixProductions API | |
| on: | |
| release: | |
| types: [created] | |
| workflow_dispatch: | |
| jobs: | |
| publish-mvn-package: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| environment: | |
| name: maven-central | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - id: import_gpg | |
| name: Import GPG key | |
| uses: crazy-max/ghaction-import-gpg@v6 | |
| with: | |
| gpg_private_key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} | |
| passphrase: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| - name: Set up Maven settings | |
| run: | | |
| mkdir -p $HOME/.m2 | |
| cp .github/settings.xml $HOME/.m2/settings.xml | |
| - name: Publish to the Maven Central Repository | |
| run: mvn --batch-mode clean deploy -T 6 | |
| env: | |
| ENCRYPTION_KEY: hwJdNY1/yC3miXQR+Vw2V3qtt1e3FPJ2y62BKtROUJs= | |
| ENCRYPTION_IV: DKKyySzj8ao5WgraQpwj+A== | |
| MAVEN_USERNAME: ${{ secrets.FUNIXPROD_MVN_REPO_USER }} | |
| MAVEN_PASSWORD: ${{ secrets.FUNIXPROD_MVN_REPO_TOKEN }} | |
| build-production-maven: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - id: import_gpg | |
| name: Import GPG key | |
| uses: crazy-max/ghaction-import-gpg@v6 | |
| with: | |
| gpg_private_key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} | |
| passphrase: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| - name: Build with Maven | |
| env: | |
| ENCRYPTION_KEY: hwJdNY1/yC3miXQR+Vw2V3qtt1e3FPJ2y62BKtROUJs= | |
| ENCRYPTION_IV: DKKyySzj8ao5WgraQpwj+A== | |
| run: mvn --batch-mode clean package -Dmaven.javadoc.skip -T 6 | |
| - name: Publish Package Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: maven-packages | |
| path: modules/**/target/*.jar | |
| build-production-docker-images: | |
| needs: build-production-maven | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Checkout source code | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker BuildX | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| install: true | |
| - name: Download Package Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: maven-packages | |
| path: modules | |
| - name: Build funixproductions api docker images and push | |
| env: | |
| IMAGE_TAG: latest | |
| run: chmod +x ./build-images.sh && ./build-images.sh | |
| update-kubernetes-cluster: | |
| needs: | |
| - build-production-docker-images | |
| runs-on: | |
| - self-hosted | |
| - k3s-funixproductions | |
| environment: | |
| name: production | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@v4 | |
| - name: Update Kubernetes Cluster | |
| run: cd kubernetes && chmod +x ./deployServices.sh && ./deployServices.sh | |
| send-success-build-discord-notif: | |
| needs: | |
| - update-kubernetes-cluster | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Discord notification | |
| env: | |
| DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_CI_STATUS }} | |
| DISCORD_USERNAME: FunixProductions-API-Deploy | |
| DISCORD_AVATAR: https://avatars.githubusercontent.com/u/99349214?s=200&v=4 | |
| uses: Ilshidur/action-discord@master | |
| with: | |
| args: '✅ FunixProductions-API 🌍**PROD** (api.funixproductions.com) a bien été déployé sur le cluster Kubernetes !' |