-
Notifications
You must be signed in to change notification settings - Fork 55
feat: Dockerized release for non-JS environments #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: docker | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| tags: | ||
| - 'v*' | ||
|
|
||
| jobs: | ||
| build-and-push: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Log in to GitHub Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Extract metadata | ||
| id: meta | ||
| uses: docker/metadata-action@v5 | ||
| with: | ||
| images: ghcr.io/${{ github.repository }} | ||
| tags: | | ||
| type=ref,event=branch | ||
| type=semver,pattern={{version}} | ||
| type=semver,pattern={{major}}.{{minor}} | ||
| type=raw,value=latest,enable={{is_default_branch}} | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Build and push | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| context: . | ||
| push: true | ||
| tags: ${{ steps.meta.outputs.tags }} | ||
| labels: ${{ steps.meta.outputs.labels }} | ||
| cache-from: type=gha | ||
| cache-to: type=gha,mode=max | ||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,12 +5,16 @@ WORKDIR /app | |||||||
| COPY . . | ||||||||
|
|
||||||||
| RUN npm install --ignore-scripts \ | ||||||||
|
Comment on lines
5
to
7
|
||||||||
| && npm run build \ | ||||||||
| && npx playwright install --with-deps chromium \ | ||||||||
| && apt-get clean \ | ||||||||
| && npm prune --omit=dev \ | ||||||||
| && npm cache clean --force \ | ||||||||
| && rm -rf /var/lib/apt/lists/* \ | ||||||||
| && rm -rf /var/cache/apt/* | ||||||||
| && npm run build \ | ||||||||
| && npx playwright install --with-deps chromium \ | ||||||||
|
Comment on lines
5
to
+9
|
||||||||
| && apt-get clean \ | ||||||||
| && npm prune --omit=dev \ | ||||||||
| && npm cache clean --force \ | ||||||||
| && rm -rf /var/lib/apt/lists/* \ | ||||||||
| && rm -rf /var/cache/apt/* | ||||||||
|
|
||||||||
| EXPOSE 3033 | ||||||||
|
||||||||
| EXPOSE 3033 | |
| EXPOSE 3033 | |
| EXPOSE 1122 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow only runs on pushes/tags and immediately pushes images; Dockerfile breakages won’t be detected until after merge. Consider adding a
pull_requesttrigger that runs the same build steps withpush: false(and optionallyload: true) so Docker build failures are caught in CI before publishing.