Skip to content

Merge pull request #4 from smec-cgint/master #59

Merge pull request #4 from smec-cgint/master

Merge pull request #4 from smec-cgint/master #59

Workflow file for this run

on:
push:
branches:
- master
tags:
- 'v*.*.*'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: install and build
env:
VITE_APP_PUBLIC_PATH: /spring-boot-startup-analyzer
VITE_APP_HISTORY: hash
VITE_APP_ANALYTICS: '<script async defer data-website-id="4a6a54a5-17d3-409d-8b28-988104b6a3e0" src="https://umami.alexey-lapin.com/umami.js"></script>'
run: |
npm install
npm run build
- name: deploy
uses: JamesIves/github-pages-deploy-action@v4
if: startsWith(github.ref, 'refs/tags/')
with:
branch: gh-pages
folder: dist
docker:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Set tag
run: echo "TAG=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: |
${{ secrets.DOCKER_HUB_USERNAME }}/spring-boot-startup-analyzer:latest
${{ secrets.DOCKER_HUB_USERNAME }}/spring-boot-startup-analyzer:${{ env.TAG }}