Skip to content

Merge pull request #1750 from terrestris/fix-broken-image #1542

Merge pull request #1750 from terrestris/fix-broken-image

Merge pull request #1750 from terrestris/fix-broken-image #1542

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/[email protected]
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@v6
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@v6
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:
if: ${{ github.actor != 'dependabot[bot]' }}
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: SonarSource/[email protected]
with:
projectBaseDir: .
env:
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST }}