Skip to content

Commit

Permalink
move into one release
Browse files Browse the repository at this point in the history
  • Loading branch information
sebasptsch committed Aug 29, 2024
1 parent 73e3f51 commit e2eb822
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 40 deletions.
49 changes: 11 additions & 38 deletions .github/workflows/changeset-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,43 +83,6 @@ jobs:
type=raw,value=${{ steps.parse-semver.outputs.major }}
type=raw,value=${{ steps.parse-semver.outputs.major }}.${{ steps.parse-semver.outputs.minor }}
type=raw,value=${{ steps.parse-semver.outputs.major }}.${{ steps.parse-semver.outputs.minor }}.${{ steps.parse-semver.outputs.patch }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker Login
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Image
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
build-args: |
VERSION=${{ matrix.package.version }}
tags: ${{ steps.meta.outputs.tags }}
push: true
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=ghcr.io/dynamicabot/dynamica-v2:latest

publish-docker-pterodactyl:
name: Publish Pterodactyl Docker Image
runs-on: ubuntu-latest
needs: release
if: needs.release.outputs.published == 'true'
strategy:
fail-fast: true
matrix:
package: ${{ fromJson(needs.release.outputs.publishedPackages) }}
steps:
- name: Parse Semver
uses: booxmedialtd/[email protected]
with:
input_string: ${{ matrix.package.version }}
id: parse-semver

- name: Docker meta (pterodactyl)
id: meta-pterodactyl
uses: docker/metadata-action@v5
Expand All @@ -133,6 +96,7 @@ jobs:
type=raw,value=${{ steps.parse-semver.outputs.major }}
type=raw,value=${{ steps.parse-semver.outputs.major }}.${{ steps.parse-semver.outputs.minor }}
type=raw,value=${{ steps.parse-semver.outputs.major }}.${{ steps.parse-semver.outputs.minor }}.${{ steps.parse-semver.outputs.patch }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Expand All @@ -143,6 +107,16 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Image
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
build-args: |
VERSION=${{ matrix.package.version }}
tags: ${{ steps.meta.outputs.tags }}
push: true
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=ghcr.io/dynamicabot/dynamica-v2:latest
- name: Build Image
uses: docker/build-push-action@v6
with:
Expand All @@ -152,5 +126,4 @@ jobs:
tags: ${{ steps.meta-pterodactyl.outputs.tags }}
push: true
labels: ${{ steps.meta-pterodactyl.outputs.labels }}
cache-from: type=registry,ref=ghcr.io/dynamicabot/dynamica-v2:latest-pterodactyl
target: pterodactyl
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Deps
FROM node:20-slim AS base
FROM node:21-alpine AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
Expand All @@ -14,7 +14,6 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
RUN pnpm run build



# Runner
FROM base as pterodactyl
COPY --from=prod-deps /app/node_modules /app/node_modules
Expand Down

0 comments on commit e2eb822

Please sign in to comment.