Skip to content

Merge pull request #1659 from terrestris/dependabot/npm_and_yarn/type… #1479

Merge pull request #1659 from terrestris/dependabot/npm_and_yarn/type…

Merge pull request #1659 from terrestris/dependabot/npm_and_yarn/type… #1479

Workflow file for this run

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@v4
- name: Setup Node.js 🧮
uses: actions/setup-node@v4
with:
node-version: 20
- name: Cache Node.js modules 💾
uses: actions/cache@v4
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/github-pages-deploy-action@v4.6.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: build
target-folder: latest
- name: Login to Nexus ⌨️
uses: docker/login-action@v3
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ secrets.NEXUS_USERNAME }}
password: ${{ secrets.NEXUS_PASSWORD }}
- name: Build docker image (main) 🏗️
uses: docker/build-push-action@v5
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@v5
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@v4
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: Setup Node.js 🧮
uses: actions/setup-node@v4
with:
node-version: 20
- name: Cache Node.js modules 💾
uses: actions/cache@v4
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: Get shogun-gis-client version 🔖
run: |
echo "sonar.projectVersion=$(node -pe "require('./package.json').version")" >> ./sonar-project.properties
- name: SonarQube Scan 🔬
uses: kitabisa/sonarqube-action@v1.2.1
with:
host: ${{ secrets.SONARQUBE_HOST }}
login: ${{ secrets.SONARQUBE_TOKEN }}