Merge pull request #1036 from terrestris/FritzHoing-patch-1 #964
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: Update gh-pages (latest) | |
env: | |
DOCKER_REGISTRY: docker-public.terrestris.de/terrestris | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources ๐ฐ | |
uses: actions/checkout@v2 | |
- name: Setup Node.js ๐งฎ | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18 | |
- name: Cache Node.js modules ๐พ | |
uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.OS }}-node- | |
${{ runner.OS }}- | |
- name: Install dependencies โฌ | |
run: npm ci | |
- name: Build artifacts ๐๏ธ | |
run: npm run build | |
- name: Deploy (to latest) ๐ | |
uses: JamesIves/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages | |
folder: build | |
target-folder: latest | |
- name: Login to Nexus โจ๏ธ | |
uses: docker/login-action@v1 | |
with: | |
registry: ${{ env.DOCKER_REGISTRY }} | |
username: ${{ secrets.NEXUS_USERNAME }} | |
password: ${{ secrets.NEXUS_PASSWORD }} | |
- name: Build docker image (main) ๐๏ธ | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
tags: | | |
${{ env.DOCKER_REGISTRY }}/shogun-gis-client:main | |
load: true | |
- name: Push docker image to Nexus (main) ๐ | |
run: | | |
docker push ${{ env.DOCKER_REGISTRY }}/shogun-gis-client:main | |
- name: Build docker image e2e-tests (main) ๐๏ธ | |
uses: docker/build-push-action@v2 | |
with: | |
file: Dockerfile.e2e | |
context: . | |
tags: | | |
${{ env.DOCKER_REGISTRY }}/shogun-gis-client-e2e-tests:main | |
load: true | |
- name: Push docker image to Nexus (main) ๐ | |
run: | | |
docker push ${{ env.DOCKER_REGISTRY }}/shogun-gis-client-e2e-tests:main | |
sonarqube: | |
name: SonarQube Trigger | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources ๐ฐ | |
uses: actions/checkout@v2 | |
with: | |
# Disabling shallow clone is recommended for improving relevancy of reporting | |
fetch-depth: 0 | |
- name: Setup Node.js ๐งฎ | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18 | |
- name: Cache Node.js modules ๐พ | |
uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.OS }}-node- | |
${{ runner.OS }}- | |
- name: Install dependencies โฌ | |
run: npm ci | |
- name: Test code โ | |
run: npm run test | |
env: | |
CI: true | |
- name: SonarQube Scan ๐ฌ | |
uses: kitabisa/[email protected] | |
with: | |
host: ${{ secrets.SONARQUBE_HOST }} | |
login: ${{ secrets.SONARQUBE_TOKEN }} |