Skip to content

Pull Request CI

Pull Request CI #1

name: Pull Request CI
on:
pull_request:
branches: [ "main" ]
types: [submitted, edited]
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: false
default: 'warning'
type: choice
options:
- info
- warning
print_tags:
description: 'True to print to STDOUT'
required: false
type: boolean
tags:
description: 'Test scenario tags'
required: false
type: string
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
steps:
- uses: actions/checkout@v3
- name: Set up maven
uses: s4u/setup-maven-action@v1.2.1
with:
java-version: '11'
maven-version: '3.6.3'
- name: docker login
run: docker login -u=citelibre -p="${{ secrets.PASSWORD_DOCKER_CITELIBRE }}"
- name: Get new version
run: |
version=$(cat VERSION | cut -d'-' -f1)
end=$(cat VERSION | cut -d'-' -f2-)
old_version=$(echo $version | rev)
old_num_version=$(echo $version | rev | cut -d'.' -f 1 | rev)
num_version=$((old_num_version+1))
old_num_version=$(echo $old_num_version | rev)
num_version=$(echo $num_version | rev)
new_version=$(echo $old_version | sed "s/$old_num_version/$num_version/" | rev)
echo "VERSION=${new_version}-${end}">> $GITHUB_ENV
echo "${new_version}-${end}" > VERSION
- name: Display version
run: echo "version $VERSION"
- name: build war ihm
run: cd citelibre-rendezvous
- name: build rendezvous
run: docker build citelibre-rendezvous -t citelibre/rendezvous:ihm-$VERSION
- name: build mysql
run: docker build mysql -t citelibre/rendezvous:db-$VERSION
- name: build matomo
run: docker build matomo -t citelibre/rendezvous:matomo-$VERSION
- name: build solr
run: docker build solr -t citelibre/rendezvous:solr-$VERSION
- name: build keycloak
run: docker build keycloak -t citelibre/rendezvous:keycloak-$VERSION
- name: build kibana
run: docker build kibana -t citelibre/rendezvous:kibana-$VERSION
- name: build elasticsearch
run: docker build elasticsearch -t citelibre/rendezvous:elasticsearch-$VERSION