Skip to content

ci: fix rules

ci: fix rules #20

Workflow file for this run

name: Stromae V1 - build docker
on:
push:
branches:
- "v1-orbeon-2022"
- "v1/**"
jobs:
build:
runs-on: ubuntu-latest
outputs:
stromae-version: ${{ steps.version-step.outputs.version }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
- name: script download and clean Orbeon
run: |
chmod +x ./scripts/get-cleaned-orbeon.sh
./scripts/get-cleaned-orbeon.sh $ORBEON_URL
shell: bash
env:
ORBEON_URL: https://github.com/orbeon/orbeon-forms/releases/download/tag-release-2022.1.6-pe-pseudo/orbeon-2022.1.6.202401300738-PE.zip
- name: Get Version
id: version-step
run: echo "version=$(mvn -f pom.xml help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT
- name: Print Version
run: echo ${{ steps.version-step.outputs.version }}
- name: Build with Maven
run: mvn clean package
- name: Upload war
uses: actions/upload-artifact@v4
with:
name: war
path: target/*.war
docker:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download build
id: download
uses: actions/download-artifact@v4
with:
name: war
path: target/
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: inseefr/stromae
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
default_branch: ${{ github.ref }}
tags: ${{ needs.build.outputs.stromae-version }}