Release 2.4.4 #195
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
concurrency: | |
group: svn2git | |
cancel-in-progress: true | |
name: svn2git CI | |
on: [push, pull_request] | |
jobs: | |
pipeline: | |
name: pipeline | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.pull_request.title, '[skip ci]') && !contains(github.event.pull_request.title, '[ci skip]')" | |
timeout-minutes: 40 | |
env: | |
NODE_VERSION: 12.16.1 | |
SPRING_OUTPUT_ANSI_ENABLED: DETECT | |
SPRING_JPA_SHOW_SQL: false | |
JHI_DISABLE_WEBPACK_LOGS: true | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 14 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: '11.x' | |
- name: 🪦 Install node.js packages | |
run: npm install | |
- name: 🚮 Remove current git | |
run: sudo apt-get remove git git-man | |
- name: Add repo | |
run: sudo add-apt-repository --remove --yes ppa:git-core/ppa | |
- name: Update platform | |
run: sudo apt-get update | |
- name: Upgrade platform | |
run: sudo apt-get upgrade | |
- name: Install git-svn | |
run: sudo apt-get install --yes git git-svn expect | |
- name: 🔍 Analyze code with SonarQube | |
continue-on-error: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
JASYPT_PWD: ${{ secrets.JASYPT_PWD }} | |
run: | | |
if [ -n $SONAR_TOKEN ]; then | |
./mvnw -ntp verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -P-webpack -Djasypt.encryptor.password=$JASYPT_PWD -DskipTests | |
else | |
echo No SONAR_TOKEN, skipping... | |
fi | |
- name: 📦 Package application | |
run: ./mvnw -ntp package -Pprod -DskipTests | |
- name: 🐳 Build and publish docker image | |
if: github.ref == 'refs/heads/master' | |
run: | | |
docker login -u ${{ secrets.DOCKERHUB_LOGIN }} -p ${{ secrets.DOCKERHUB_PWD }} | |
GIT_TAG=:${GITHUB_REF#refs/tags/} | |
DOCKER_TAG=${GIT_TAG#:refs/heads/main} | |
docker build . -t yodamad/svn2git:latest | |
docker build . -t yodamad/svn2git:master | |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) | |
docker build . -t yodamad/svn2git:$VERSION | |
docker push yodamad/svn2git:$VERSION | |
docker push yodamad/svn2git:latest | |
docker push yodamad/svn2git:master |