Skip to content

[releng] Update the github workflow #4

[releng] Update the github workflow

[releng] Update the github workflow #4

Workflow file for this run

name: Continuous integration
on:
push:
paths-ignore:
- "CHANGELOG.adoc"
- "README.adoc"
- "doc/**"
branches:
- "**"
tags:
- "*"
pull_request:
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
packages: write
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps:
- name: Checkout
uses: actions/checkout@v4
if: github.event_name != 'pull_request'
with:
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Java SDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: "temurin"
- name: Setup some global environment variables
run: |
echo "git_describe=$(git describe)" >> $GITHUB_ENV
- name: Build the backend
env:
USERNAME: ${{ github.actor }}
PASSWORD: ${{ github.token }}
run: mvn -U -B -e clean verify -f backend/pom.xml --settings settings.xml
- name: Publish the backend
if: startsWith(github.ref, 'refs/tags/v')
env:
USERNAME: ${{ github.actor }}
PASSWORD: ${{ github.token }}
GITHUB_TOKEN: ${{ github.token }}
run: mvn -B deploy -DskipTests --settings settings.xml