ci: Docker on push #10
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: Stromae V1 - build docker | |
on: | |
push: | |
branches: | |
- 'v1-orbeon-2022' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: script download and clean Orbeon | |
run: | | |
chmod +x ./script/getCleanedOrbeon.sh | |
./script/getCleanedOrbeon.sh $ORBEON_URL_CE | |
shell: bash | |
env: | |
ORBEON_URL_CE: https://github.com/orbeon/orbeon-forms/releases/download/tag-release-2023.1-ce/orbeon-2023.1.202312312000-CE.zip | |
- name: Build with Maven | |
run: mvn clean install | |
- name: Upload war | |
uses: actions/upload-artifact@v2 | |
with: | |
name: war | |
path: target/*.war | |
docker: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Download build | |
id: download | |
uses: actions/download-artifact@v2 | |
with: | |
name: war | |
path: target/ | |
- name: Publish to Registry | |
uses: elgohr/Publish-Docker-Github-Action@master | |
with: | |
name: inseefr/stromae:1.2.3 | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |