Skip to content

Commit

Permalink
カスタム sablier イメージをビルドするように (#998)
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-20 authored Jan 18, 2025
1 parent 467eae4 commit e924c90
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 2 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,41 @@ jobs:
# NOTE: once https://github.com/argoproj/argo-cd/pull/13199 is released we can use short sha
tags: ghcr.io/traptitech/ns-dashboard:preview-${{ env.PR_NUMBER }}-${{ github.event.pull_request.head.sha }}
cache-from: type=registry,ref=ghcr.io/traptitech/ns-dashboard:buildcache

build-sablier-image:
name: Build Sablier Image
runs-on: ubuntu-latest
steps:
- name: Set PR_NUMBER env
run: echo "PR_NUMBER=${{ github.event.number }}" >> $GITHUB_ENV

- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Builder instance name
run: echo ${{ steps.buildx.outputs.name }}
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: traptitech
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build
uses: docker/build-push-action@v6
with:
context: sablier
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/traptitech/ns-sablier:preview-${{ env.PR_NUMBER }}-${{ github.event.pull_request.head.sha }}
cache-from: type=registry,ref=ghcr.io/traptitech/ns-sablier:buildcache
37 changes: 37 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,49 @@ jobs:
ghcr.io/traptitech/ns-dashboard:${{ env.APP_VERSION }}
cache-from: type=registry,ref=ghcr.io/traptitech/ns-dashboard:buildcache

build-sablier-image:
name: Build Sablier Image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set APP_VERSION env
run: echo "APP_VERSION=$(echo ${GITHUB_REF:11})" >> $GITHUB_ENV

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Builder instance name
run: echo ${{ steps.buildx.outputs.name }}
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: traptitech
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build
uses: docker/build-push-action@v6
with:
context: sablier
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/traptitech/ns-sablier:latest
ghcr.io/traptitech/ns-sablier:${{ env.APP_VERSION }}
cache-from: type=registry,ref=ghcr.io/traptitech/ns-sablier:buildcache

dispatch-renovate:
name: Dispatch Renovate
runs-on: ubuntu-latest
needs:
- build-component-images
- build-dashboard-image
- build-sablier-image
steps:
- uses: actions/github-script@v7
with:
Expand Down
2 changes: 1 addition & 1 deletion .local-manifest/sablier/sablier-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ spec:
subPath: .local-dev/config/sablier.yaml
mountPath: /etc/sablier/sablier.yaml
- name: project
subPath: dashboard/sablier-theme
subPath: sablier/themes
mountPath: /etc/sablier/themes
2 changes: 1 addition & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ services:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./.local-dev/config/sablier.yaml:/etc/sablier/sablier.yaml
- ./dashboard/sablier-theme:/etc/sablier/themes
- ./sablier/themes:/etc/sablier/themes

traefik:
image: traefik:3.1
Expand Down
3 changes: 3 additions & 0 deletions sablier/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM sablierapp/sablier:1.8.2

COPY ./themes /etc/sablier/themes
File renamed without changes.

0 comments on commit e924c90

Please sign in to comment.