Bump quarkus.platform.version from 3.5.1 to 3.6.2 #44
Workflow file for this run
This file contains 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: Build, push and deploy | |
on: | |
push: | |
workflow_dispatch: | |
env: | |
DEPLOYMENT_NAME: ${{ vars.TEAMNAME }} | |
DEPLOYMENT_TOKEN: ${{ secrets.TOKEN }} | |
NAMESPACE: ${{ vars.NAMESPACE }} | |
jobs: | |
build: | |
permissions: | |
packages: write | |
runs-on: ubuntu-latest | |
name: Build app | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@master | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Cache maven packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Prepare repository name | |
run: | | |
echo IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV | |
- name: Build jar | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
run: | | |
mvn --batch-mode --update-snapshots clean package \ | |
-Dquarkus.container-image.build=true \ | |
-Dquarkus.container-image.image=ghcr.io/${{ env.IMAGE_REPOSITORY }}:latest \ | |
-Dquarkus.kubernetes.service-type=ClusterIP \ | |
-Dquarkus.kubernetes.ingress.expose=true \ | |
-Dquarkus.kubernetes.ingress.tls.=true \ | |
-Dquarkus.kubernetes.ingress.host=${{ env.DEPLOYMENT_NAME }}.play.continuouspoker.org \ | |
-Dquarkus.kubernetes.ingress.ingress-class-name=nginx \ | |
-Dquarkus.kubernetes.ingress.tls.letsencrypt-nginx-private-key.enabled=true \ | |
-Dquarkus.kubernetes.ingress.tls.letsencrypt-nginx-private-key.hosts=${{ env.DEPLOYMENT_NAME }}.play.continuouspoker.org \ | |
-Dquarkus.kubernetes.name=${{ env.DEPLOYMENT_NAME }} | |
- name: Log in to registry | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: Push the Docker image to GHCR | |
run: | | |
docker push ghcr.io/${{ env.IMAGE_REPOSITORY }} | |
- name: Deploy | |
if: github.ref == 'refs/heads/main' | |
run: |- | |
echo "${{ env.DEPLOYMENT_TOKEN }}" > kubeconfig.yaml | |
kubectl --kubeconfig kubeconfig.yaml --namespace ${{ env.NAMESPACE }} apply -f target/kubernetes/kubernetes.yml | |
kubectl --kubeconfig kubeconfig.yaml --namespace ${{ env.NAMESPACE }} rollout status deployment/${{ env.DEPLOYMENT_NAME }} | |
kubectl --kubeconfig kubeconfig.yaml --namespace ${{ env.NAMESPACE }} get services -o wide | |
rm kubeconfig.yaml |