Skip to content

1.3.1 - fix command bot creation #20

1.3.1 - fix command bot creation

1.3.1 - fix command bot creation #20

# This is a basic workflow to help you get started with Actions
name: Push Maven realease
on:
release:
types: [created]
jobs:
publish-maven-central:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v3
- id: import_gpg
name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
passphrase: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish to the Maven Central Repository
run: mvn --batch-mode clean deploy -T 6
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
build-production-maven:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout Code
uses: actions/checkout@v3
- id: import_gpg
name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
passphrase: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn --batch-mode clean package -T 6
- name: Publish Package Artifacts
uses: actions/upload-artifact@v3
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@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout source code
uses: actions/checkout@v3
- name: Download Package Artifacts
uses: actions/download-artifact@v3
with:
name: maven-packages
path: modules
- name: Build funixgaming api docker images and push
env:
IMAGE_TAG: latest
run: docker compose build --push
update-kubernetes-cluster:
needs:
- build-production-docker-images
runs-on: ubuntu-latest
steps:
- name: Set up kubectl
uses: azure/k8s-set-context@v3
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
env:
KUBECONFIG: ${{ secrets.KUBECONFIG }}
- name: Checkout source code
uses: actions/checkout@v3
- 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: FunixGaming-API-Deploy
DISCORD_AVATAR: https://avatars.githubusercontent.com/u/99349214?s=200&v=4
uses: Ilshidur/action-discord@master
with:
args: '✅ FunixGaming-API 🌍️**PROD** (api.funixgaming.fr) a bien été déployé sur le cluster Kubernetes !'