build(deps): bump quarkus.platform.version in /modules/gs-user-q (#643) #306
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
# This workflow will build a Java project with Maven | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: CI (gs-user-q) | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- "modules/gs-user-q/**" | |
- ".github/workflows/gs-user-q.yml" | |
pull_request: | |
types: [ opened, synchronize, reopened ] | |
paths: | |
- "modules/gs-user-q/**" | |
- ".github/workflows/gs-user-q.yml" | |
defaults: | |
run: | |
working-directory: ./modules/gs-user-q | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v1 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Cache Maven packages | |
uses: actions/cache@v1 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Build and analyze | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar package | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set image tag on pull request | |
if: github.event_name == 'pull_request' | |
run: | | |
echo "image_tag=$(echo ${GITHUB_HEAD_REF})" >> $GITHUB_ENV | |
- name: Set image tag on master | |
if: github.ref == 'refs/heads/master' | |
run: | |
echo "image_tag=latest" >> $GITHUB_ENV | |
- name: Print image tag | |
run: | |
echo "${{ env.image_tag }}" | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
tags: sanek555/gs-user-q:${{ env.image_tag }} | |
file: ./modules/gs-user-q/docker/Dockerfile # Path to the file relatively to the root directory | |
context: ./modules/gs-user-q # Directory in which you would run 'docker build' command, . stands for root | |
- name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} |