Bump gitpython from 3.1.30 to 3.1.32 #593
Workflow file for this run
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: "cadastrapp" | |
on: | |
push: | |
pull_request: | |
release: | |
types: [published] | |
jobs: | |
build-deb-package: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checking out" | |
uses: actions/checkout@v2 | |
- name: "Setting up Java" | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '8.x' | |
- name: "Maven repository caching" | |
uses: actions/cache@v1 | |
with: | |
path: ~/.m2/repository | |
key: cadastrapp-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: "Build with Maven" | |
run: mvn -B clean package deb:package -pl cadastrapp -PdebianPackage | |
- name: Remove SNAPSHOT jars from repository | |
run: | | |
find .m2/repository -name "*SNAPSHOT*" -type d | xargs rm -rf {} | |
- name: "copy resulting deb" | |
run: mkdir -p scratch && cp cadastrapp/target/georchestra-cadastrapp*.deb scratch/ | |
- name: "publish deb as artifact" | |
uses: actions/upload-artifact@v1 | |
with: | |
name: cadastrapp.deb | |
path: scratch/ | |
build-docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checking out" | |
uses: actions/checkout@v2 | |
- name: "Setting up Java" | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '8.x' | |
- name: "Maven repository caching" | |
uses: actions/cache@v1 | |
with: | |
path: ~/.m2/repository | |
key: cadastrapp-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Calculating docker image tag | |
if: github.repository == 'georchestra/cadastrapp' | |
id: version | |
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) | |
- name: build a docker image | |
if: github.repository == 'georchestra/cadastrapp' | |
run: mvn -B clean package docker:build -pl cadastrapp -Pdocker -DdockerImageName=georchestra/cadastrapp:${{ steps.version.outputs.VERSION }} | |
- name: "Logging in docker.io" | |
if: github.repository == 'georchestra/cadastrapp' | |
uses: azure/docker-login@v1 | |
with: | |
username: '${{ secrets.DOCKER_HUB_USERNAME }}' | |
password: '${{ secrets.DOCKER_HUB_PASSWORD }}' | |
- name: "Pushing latest to docker.io" | |
if: github.repository == 'georchestra/cadastrapp' && github.ref == 'refs/heads/master' | |
run: | | |
docker tag georchestra/cadastrapp:${{ steps.version.outputs.VERSION }} georchestra/cadastrapp:latest | |
docker push georchestra/cadastrapp:latest | |
- name: "Pushing release tag to docker.io" | |
if: github.repository == 'georchestra/cadastrapp' && contains(github.ref, 'refs/tags/') | |
run: | | |
docker push georchestra/cadastrapp:${{ steps.version.outputs.VERSION }} | |
- name: "Publish binary in artifactory" | |
run: ./mvn deploy | |
continue-on-error: true | |
env: | |
ARTIFACTORY_TOKEN_REF: ${{ secrets.ARTIFACTORY_TOKEN }} | |
ARTIFACTORY_USERNAME_REF: ${{ secrets.ARTIFACTORY_USERNAME }} | |
- name: Remove SNAPSHOT jars from repository | |
run: | | |
find .m2/repository -name "*SNAPSHOT*" -type d | xargs rm -rf {} |