Merge pull request #1106 from terrestris/dependabot/npm_and_yarn/sema… #1015
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 }} |