Skip to content

fix(deps): update dependency posthog-js to v1.203.3 #20

fix(deps): update dependency posthog-js to v1.203.3

fix(deps): update dependency posthog-js to v1.203.3 #20

Workflow file for this run

name: Build server
on:
push:
branches:
- 'main'
tags:
- '*'
pull_request:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install tools
uses: jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8 # v2.1.11
- name: Generate commit hash
id: hash
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Install frontend dependencies with npm
run: npm ci
- name: Lint frontend
run: npm run lint
- name: Lint go project
run: golangci-lint run --out-format=colored-line-number
- name: Build frontend
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: npm run build:prod
- name: Build frontend and upload source maps (tag only)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
npm run build:prod -- --source-map=true || exit 1
npm run sentry-upload || exit 1
rm internal/frontend/dist/cloud-ui/browser/*.map || exit 1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
VERSION: ${{ github.ref_name }}
- name: Build application
run: go build -ldflags="$LDFLAGS" -o dist/cloud ./cmd/cloud/
env:
CGO_ENABLED: '0'
LDFLAGS: >-
-X github.com/glasskube/cloud/internal/buildconfig.version=${{ github.ref_name }}
-X github.com/glasskube/cloud/internal/buildconfig.commit=${{ steps.hash.outputs.sha_short }}
- name: Login to GitHub Container Registry (tag only)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate Docker Metadata
id: meta
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
with:
images: ghcr.io/glasskube/cloud
tags: |
type=ref,event=branch
type=sha,event=branch
type=semver,pattern={{version}}
labels: |
org.opencontainers.image.description=Glasskube Cloud Software Distribution Platform
org.opencontainers.image.vendor=Glasskube
- name: Docker build (push on tag only)
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
with:
context: .
file: Dockerfile.server
push: ${{ startsWith(github.ref, 'refs/tags/') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}