Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Docker Image

on:
pull_request:
push:
branches:
- master
- release/**
jobs:
build-docker-image:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-24.04
platform: amd64
- os: ubuntu-24.04-arm
platform: arm64
name: build-docker-image-${{ matrix.platform }}
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Build and push chartcuterie image
uses: getsentry/action-build-and-push-images@b172ab61a5f7eabd58bd42ce231b517e79947c01
with:
image_name: 'chartcuterie'
platforms: linux/${{ matrix.platform }}
dockerfile_path: './Dockerfile'
ghcr: ${{ github.event_name != 'pull_request' }}
tag_suffix: -${{ matrix.platform }}
publish_on_pr: true
google_ar: false
tag_nightly: false
tag_latest: false

assemble-chartcuterie-image:
runs-on: ubuntu-latest
needs: [build-docker-image]
if: ${{ (github.ref_name == 'master' || startsWith(github.ref_name, 'release/')) && github.event_name != 'pull_request' }}
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- run: docker login --username '${{ github.actor }}' --password-stdin ghcr.io <<< "$GHCR_TOKEN"
env:
GHCR_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1

- name: Create multiplatform manifests
run: |
docker buildx imagetools create \
--tag ghcr.io/getsentry/chartcuterie:${{ github.event.pull_request.head.sha || github.sha }} \
--tag ghcr.io/getsentry/chartcuterie:nightly \
ghcr.io/getsentry/chartcuterie:${{ github.event.pull_request.head.sha || github.sha }}-amd64 \
ghcr.io/getsentry/chartcuterie:${{ github.event.pull_request.head.sha || github.sha }}-arm64
28 changes: 28 additions & 0 deletions .github/workflows/release-ghcr-version-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release GHCR Versioned Image

on:
release:
types: [prereleased, released]

jobs:
release-ghcr-version-tag:
runs-on: ubuntu-latest
steps:
- name: Log in to GitHub Container Registry
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Tag release version
run: |
docker buildx imagetools create --tag \
ghcr.io/getsentry/chartcuterie:${{ github.ref_name }} \
ghcr.io/getsentry/chartcuterie:${{ github.sha }}

- name: Tag latest version
run: |
docker buildx imagetools create --tag \
ghcr.io/getsentry/chartcuterie:latest \
ghcr.io/getsentry/chartcuterie:${{ github.sha }}

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20 AS builder
FROM node:20.19.5-bookworm AS builder

COPY package.json yarn.lock .
RUN yarn install --frozen-lockfile
Expand All @@ -7,14 +7,15 @@ COPY tsconfig.json .
COPY src src
RUN yarn build

FROM node:20-slim
FROM node:20.19.5-bookworm-slim

ENV NODE_ENV=production

RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libcairo2-dev \
libpango1.0-dev \
libpangocairo-1.0-0 \
libjpeg-dev \
libgif-dev \
librsvg2-dev \
Expand Down
2 changes: 1 addition & 1 deletion devservices/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ x-sentry-service-config:

services:
chartcuterie:
image: us-central1-docker.pkg.dev/sentryio/chartcuterie/image:latest
image: ghcr.io/getsentry/chartcuterie:nightly
environment:
CHARTCUTERIE_CONFIG: /etc/chartcuterie/config.js
CHARTCUTERIE_CONFIG_POLLING: true
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"dependencies": {
"@sentry/node": "10.0.0",
"@sentry/profiling-node": "10.0.0",
"canvas": "^2.11.2",
"canvas": "^3.2.0",
"dotenv": "^8.2.0",
"echarts": "6.0.0",
"express": "4.21.2",
Expand Down
Loading
Loading