From 8b57a2b055157587cf0c57b2892f9a43c7b30839 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 20 Jan 2023 09:26:48 +0100 Subject: [PATCH 1/8] fix: cleanup function --- apps/api/src/index.ts | 4 +- apps/api/src/lib/common.ts | 80 +++++--------------------- apps/api/src/routes/api/v1/handlers.ts | 2 +- package.json | 2 +- 4 files changed, 18 insertions(+), 70 deletions(-) diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts index 1ab6acd47..44d46f8a3 100644 --- a/apps/api/src/index.ts +++ b/apps/api/src/index.ts @@ -591,6 +591,8 @@ async function cleanupStorage() { } } } catch (error) {} - await cleanupDockerStorage(destination.id, lowDiskSpace, force); + if (lowDiskSpace) { + await cleanupDockerStorage(destination.id); + } } } diff --git a/apps/api/src/lib/common.ts b/apps/api/src/lib/common.ts index 02f932613..3eeced3f7 100644 --- a/apps/api/src/lib/common.ts +++ b/apps/api/src/lib/common.ts @@ -19,7 +19,7 @@ import { saveBuildLog, saveDockerRegistryCredentials } from './buildPacks/common import { scheduler } from './scheduler'; import type { ExecaChildProcess } from 'execa'; -export const version = '3.12.14'; +export const version = '3.12.15'; export const isDev = process.env.NODE_ENV === 'development'; export const sentryDSN = 'https://409f09bcb7af47928d3e0f46b78987f3@o1082494.ingest.sentry.io/4504236622217216'; @@ -1714,78 +1714,24 @@ export function convertTolOldVolumeNames(type) { } } -export async function cleanupDockerStorage(dockerId, lowDiskSpace, force) { - // Cleanup old coolify images +export async function cleanupDockerStorage(dockerId) { + // Cleanup images that are not used by any container try { - let { stdout: images } = await executeCommand({ - dockerId, - command: `docker images coollabsio/coolify --filter before="coollabsio/coolify:${version}" -q | xargs -r`, - shell: true - }); - - images = images.trim(); - if (images) { - await executeCommand({ - dockerId, - command: `docker rmi -f ${images}" -q | xargs -r`, - shell: true - }); - } + await executeCommand({ dockerId, command: `docker image prune -af` }); } catch (error) {} - if (lowDiskSpace || force) { - // Cleanup images that are not used - try { - await executeCommand({ dockerId, command: `docker image prune -f` }); - } catch (error) {} - const { numberOfDockerImagesKeptLocally } = await prisma.setting.findUnique({ - where: { id: '0' } - }); - const { stdout: images } = await executeCommand({ + // Prune coolify managed containers + try { + await executeCommand({ dockerId, - command: `docker images|grep -v ""|grep -v REPOSITORY|awk '{print $1, $2}'`, - shell: true + command: `docker container prune -f --filter "label=coolify.managed=true"` }); - const imagesArray = images.trim().replaceAll(' ', ':').split('\n'); - const imagesSet = new Set(imagesArray.map((image) => image.split(':')[0])); - let deleteImage = []; - for (const image of imagesSet) { - let keepImage = []; - for (const image2 of imagesArray) { - if (image2.startsWith(image)) { - if (force) { - deleteImage.push(image2); - continue; - } - if (keepImage.length >= numberOfDockerImagesKeptLocally) { - deleteImage.push(image2); - } else { - keepImage.push(image2); - } - } - } - } - for (const image of deleteImage) { - try { - await executeCommand({ dockerId, command: `docker image rm -f ${image}` }); - } catch (error) { - console.log(error); - } - } + } catch (error) {} - // Prune coolify managed containers - try { - await executeCommand({ - dockerId, - command: `docker container prune -f --filter "label=coolify.managed=true"` - }); - } catch (error) {} - - // Cleanup build caches - try { - await executeCommand({ dockerId, command: `docker builder prune -a -f` }); - } catch (error) {} - } + // Cleanup build caches + try { + await executeCommand({ dockerId, command: `docker builder prune -af` }); + } catch (error) {} } export function persistentVolumes(id, persistentStorage, config) { diff --git a/apps/api/src/routes/api/v1/handlers.ts b/apps/api/src/routes/api/v1/handlers.ts index 382635800..52d5e4e38 100644 --- a/apps/api/src/routes/api/v1/handlers.ts +++ b/apps/api/src/routes/api/v1/handlers.ts @@ -59,7 +59,7 @@ export async function cleanupManually(request: FastifyRequest) { const destination = await prisma.destinationDocker.findUnique({ where: { id: serverId } }); - await cleanupDockerStorage(destination.id, true, true); + await cleanupDockerStorage(destination.id); return {}; } catch ({ status, message }) { return errorHandler({ status, message }); diff --git a/package.json b/package.json index 9ace8b3e1..88034d7b7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "coolify", "description": "An open-source & self-hostable Heroku / Netlify alternative.", - "version": "3.12.14", + "version": "3.12.15", "license": "Apache-2.0", "repository": "github:coollabsio/coolify", "scripts": { From 27021538d81c32d9e095d8361e93227d6864b70a Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 20 Jan 2023 09:40:29 +0100 Subject: [PATCH 2/8] fix: cleanup stucked containers --- apps/api/src/index.ts | 54 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 50 insertions(+), 4 deletions(-) diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts index 44d46f8a3..9975523a3 100644 --- a/apps/api/src/index.ts +++ b/apps/api/src/index.ts @@ -197,7 +197,13 @@ const host = '0.0.0.0'; await copySSLCertificates(); }, 10000); - await Promise.all([getTagsTemplates(), getArch(), getIPAddress(), configureRemoteDockers()]); + await Promise.all([ + getTagsTemplates(), + getArch(), + getIPAddress(), + configureRemoteDockers(), + cleanupStuckedContainers() + ]); } catch (error) { console.error(error); process.exit(1); @@ -311,6 +317,42 @@ async function getArch() { } catch (error) {} } +async function cleanupStuckedContainers() { + try { + const destinationDockers = await prisma.destinationDocker.findMany(); + let enginesDone = new Set(); + for (const destination of destinationDockers) { + if (enginesDone.has(destination.engine) || enginesDone.has(destination.remoteIpAddress)) + return; + if (destination.engine) { + enginesDone.add(destination.engine); + } + if (destination.remoteIpAddress) { + if (!destination.remoteVerified) continue; + enginesDone.add(destination.remoteIpAddress); + } + const { stdout: containers } = await executeCommand({ + dockerId: destination.id, + command: `docker container ps -a --filter "label=coolify.managed=true" --format '{{ .Names}}'` + }); + if (containers) { + const containersArray = containers.trim().split('\n'); + if (containersArray.length > 0) { + for (const container of containersArray) { + const application = await prisma.application.findFirst({ where: { id: container } }); + const service = await prisma.service.findFirst({ where: { id: container } }); + const database = await prisma.database.findFirst({ where: { id: container } }); + if (!application && !service && !database) { + await executeCommand({ command: `docker container rm -f ${container}` }); + } + } + } + } + } + } catch (error) { + console.log(error); + } +} async function configureRemoteDockers() { try { const remoteDocker = await prisma.destinationDocker.findMany({ @@ -543,9 +585,13 @@ async function cleanupStorage() { let enginesDone = new Set(); for (const destination of destinationDockers) { if (enginesDone.has(destination.engine) || enginesDone.has(destination.remoteIpAddress)) return; - if (destination.engine) enginesDone.add(destination.engine); - if (destination.remoteIpAddress) enginesDone.add(destination.remoteIpAddress); - let force = false; + if (destination.engine) { + enginesDone.add(destination.engine); + } + if (destination.remoteIpAddress) { + if (!destination.remoteVerified) continue; + enginesDone.add(destination.remoteIpAddress); + } let lowDiskSpace = false; try { let stdout = null; From 6b2a453b8f7adace01ff3908c6ffab2eba1ed2d2 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 20 Jan 2023 10:10:36 +0100 Subject: [PATCH 3/8] fix: deletion + cleanupStuckedContainers --- apps/api/src/index.ts | 5 ++ .../routes/api/v1/applications/handlers.ts | 9 +-- .../src/routes/api/v1/databases/handlers.ts | 14 ++-- apps/api/src/routes/api/v1/databases/types.ts | 2 +- .../src/routes/api/v1/services/handlers.ts | 23 +++++++ .../server/src/trpc/routers/services/index.ts | 23 +++++++ .../routes/applications/[id]/__layout.svelte | 2 +- .../routes/applications/[id]/danger.svelte | 2 +- .../src/routes/databases/[id]/__layout.svelte | 2 +- apps/ui/src/routes/index.svelte | 64 +++++++++---------- .../src/routes/services/[id]/__layout.svelte | 4 +- .../ui/src/routes/services/[id]/danger.svelte | 6 +- 12 files changed, 99 insertions(+), 57 deletions(-) diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts index 9975523a3..b3214ecee 100644 --- a/apps/api/src/index.ts +++ b/apps/api/src/index.ts @@ -171,6 +171,11 @@ const host = '0.0.0.0'; await cleanupStorage(); }, 60000 * 15); + // Cleanup stucked containers (not defined in Coolify, but still running and managed by Coolify) + setInterval(async () => { + await cleanupStuckedContainers(); + }, 60000 * 5); + // checkProxies, checkFluentBit & refresh templates setInterval(async () => { await checkProxies(); diff --git a/apps/api/src/routes/api/v1/applications/handlers.ts b/apps/api/src/routes/api/v1/applications/handlers.ts index 94cf19e95..dd669ca33 100644 --- a/apps/api/src/routes/api/v1/applications/handlers.ts +++ b/apps/api/src/routes/api/v1/applications/handlers.ts @@ -732,14 +732,15 @@ export async function deleteApplication( ) { try { const { id } = request.params; - const { force } = request.body; - const { teamId } = request.user; const application = await prisma.application.findUnique({ where: { id }, - include: { destinationDocker: true } + include: { destinationDocker: true, teams: true } }); - if (!force && application?.destinationDockerId && application.destinationDocker?.network) { + if (!application.teams.find((team) => team.id === teamId) || teamId !== '0') { + throw { status: 403, message: 'You are not allowed to delete this application.' }; + } + if (application?.destinationDocker?.id && application.destinationDocker?.network) { const { stdout: containers } = await executeCommand({ dockerId: application.destinationDocker.id, command: `docker ps -a --filter network=${application.destinationDocker.network} --filter name=${id} --format '{{json .}}'` diff --git a/apps/api/src/routes/api/v1/databases/handlers.ts b/apps/api/src/routes/api/v1/databases/handlers.ts index 6127ac25e..982699fde 100644 --- a/apps/api/src/routes/api/v1/databases/handlers.ts +++ b/apps/api/src/routes/api/v1/databases/handlers.ts @@ -427,19 +427,15 @@ export async function deleteDatabase(request: FastifyRequest) { try { const teamId = request.user.teamId; const { id } = request.params; - const { force } = request.body; const database = await prisma.database.findFirst({ where: { id, teams: { some: { id: teamId === '0' ? undefined : teamId } } }, include: { destinationDocker: true, settings: true } }); - if (!force) { - if (database.dbUserPassword) database.dbUserPassword = decrypt(database.dbUserPassword); - if (database.rootUserPassword) database.rootUserPassword = decrypt(database.rootUserPassword); - if (database.destinationDockerId) { - const everStarted = await stopDatabaseContainer(database); - if (everStarted) - await stopTcpHttpProxy(id, database.destinationDocker, database.publicPort); - } + if (database.dbUserPassword) database.dbUserPassword = decrypt(database.dbUserPassword); + if (database.rootUserPassword) database.rootUserPassword = decrypt(database.rootUserPassword); + if (database.destinationDockerId) { + const everStarted = await stopDatabaseContainer(database); + if (everStarted) await stopTcpHttpProxy(id, database.destinationDocker, database.publicPort); } await prisma.databaseSettings.deleteMany({ where: { databaseId: id } }); await prisma.databaseSecret.deleteMany({ where: { databaseId: id } }); diff --git a/apps/api/src/routes/api/v1/databases/types.ts b/apps/api/src/routes/api/v1/databases/types.ts index ba9b0b8e9..554521e21 100644 --- a/apps/api/src/routes/api/v1/databases/types.ts +++ b/apps/api/src/routes/api/v1/databases/types.ts @@ -4,7 +4,7 @@ export interface SaveDatabaseType extends OnlyId { Body: { type: string } } export interface DeleteDatabase extends OnlyId { - Body: { force: string } + Body: { } } export interface SaveVersion extends OnlyId { Body: { diff --git a/apps/api/src/routes/api/v1/services/handlers.ts b/apps/api/src/routes/api/v1/services/handlers.ts index 3b1319202..ba87aa6f3 100644 --- a/apps/api/src/routes/api/v1/services/handlers.ts +++ b/apps/api/src/routes/api/v1/services/handlers.ts @@ -617,6 +617,29 @@ export async function getServiceLogs(request: FastifyRequest) { export async function deleteService(request: FastifyRequest) { try { const { id } = request.params; + const teamId = request.user.teamId; + const { destinationDockerId } = await getServiceFromDB({ id, teamId }); + if (destinationDockerId) { + const { stdout: containers } = await executeCommand({ + dockerId: destinationDockerId, + command: `docker ps -a --filter 'label=com.docker.compose.project=${id}' --format {{.ID}}` + }); + if (containers) { + const containerArray = containers.split('\n'); + if (containerArray.length > 0) { + for (const container of containerArray) { + await executeCommand({ + dockerId: destinationDockerId, + command: `docker stop -t 0 ${container}` + }); + await executeCommand({ + dockerId: destinationDockerId, + command: `docker rm --force ${container}` + }); + } + } + } + } await removeService({ id }); return {}; } catch ({ status, message }) { diff --git a/apps/server/src/trpc/routers/services/index.ts b/apps/server/src/trpc/routers/services/index.ts index 755446ee1..c4c1e4b57 100644 --- a/apps/server/src/trpc/routers/services/index.ts +++ b/apps/server/src/trpc/routers/services/index.ts @@ -827,6 +827,29 @@ export const servicesRouter = router({ .mutation(async ({ input }) => { // todo: check if user is allowed to delete service const { id } = input; + const teamId = ctx.user?.teamId; + const { destinationDockerId } = await getServiceFromDB({ id, teamId }); + if (destinationDockerId) { + const { stdout: containers } = await executeCommand({ + dockerId: destinationDockerId, + command: `docker ps -a --filter 'label=com.docker.compose.project=${id}' --format {{.ID}}` + }); + if (containers) { + const containerArray = containers.split('\n'); + if (containerArray.length > 0) { + for (const container of containerArray) { + await executeCommand({ + dockerId: destinationDockerId, + command: `docker stop -t 0 ${container}` + }); + await executeCommand({ + dockerId: destinationDockerId, + command: `docker rm --force ${container}` + }); + } + } + } + } await prisma.serviceSecret.deleteMany({ where: { serviceId: id } }); await prisma.serviceSetting.deleteMany({ where: { serviceId: id } }); await prisma.servicePersistentStorage.deleteMany({ where: { serviceId: id } }); diff --git a/apps/ui/src/routes/applications/[id]/__layout.svelte b/apps/ui/src/routes/applications/[id]/__layout.svelte index 502861a93..6e29cf9b3 100644 --- a/apps/ui/src/routes/applications/[id]/__layout.svelte +++ b/apps/ui/src/routes/applications/[id]/__layout.svelte @@ -89,7 +89,7 @@ const sure = confirm($t('application.confirm_to_delete', { name })); if (sure) { try { - await del(`/applications/${id}`, { id, force }); + await del(`/applications/${id}`, {}); return await goto('/'); } catch (error) { if (error.message.startsWith(`Command failed: SSH_AUTH_SOCK=/tmp/coolify-ssh-agent.pid`)) { diff --git a/apps/ui/src/routes/applications/[id]/danger.svelte b/apps/ui/src/routes/applications/[id]/danger.svelte index 373520362..9d65bb65e 100644 --- a/apps/ui/src/routes/applications/[id]/danger.svelte +++ b/apps/ui/src/routes/applications/[id]/danger.svelte @@ -34,7 +34,7 @@ if (sure) { $status.application.initialLoading = true; try { - await del(`/applications/${id}`, { id, force }); + await del(`/applications/${id}`,{}); return await goto('/') } catch (error) { if (error.message.startsWith(`Command failed: SSH_AUTH_SOCK=/tmp/coolify-ssh-agent.pid`)) { diff --git a/apps/ui/src/routes/databases/[id]/__layout.svelte b/apps/ui/src/routes/databases/[id]/__layout.svelte index 1feb5be48..5d170a9fa 100644 --- a/apps/ui/src/routes/databases/[id]/__layout.svelte +++ b/apps/ui/src/routes/databases/[id]/__layout.svelte @@ -75,7 +75,7 @@ if (sure) { $status.database.initialLoading = true; try { - await del(`/databases/${database.id}`, { id: database.id, force }); + await del(`/databases/${database.id}`, {}); return await window.location.assign('/'); } catch (error) { return errorNotification(error); diff --git a/apps/ui/src/routes/index.svelte b/apps/ui/src/routes/index.svelte index f2d3b6d4e..3c47041e2 100644 --- a/apps/ui/src/routes/index.svelte +++ b/apps/ui/src/routes/index.svelte @@ -437,7 +437,7 @@ try { const sure = confirm('Are you sure? This will delete this application!'); if (sure) { - await del(`/applications/${id}`, { force: true }); + await del(`/applications/${id}`, {}); return window.location.reload(); } } catch (error) { @@ -459,7 +459,7 @@ try { const sure = confirm('Are you sure? This will delete this database!'); if (sure) { - await del(`/databases/${id}`, { force: true }); + await del(`/databases/${id}`, { }); return window.location.reload(); } } catch (error) { @@ -784,11 +784,11 @@ {/if} {#if $appSession.isAdmin} - + {/if} @@ -899,11 +899,11 @@ {/if} {#if $appSession.isAdmin} - + {/if} @@ -996,11 +996,11 @@ {/if} {#if $appSession.isAdmin} - + {/if} @@ -1084,11 +1084,11 @@ {/if} {#if $appSession.isAdmin} - + {/if} @@ -1182,11 +1182,11 @@ {/if} {#if $appSession.isAdmin} - + {/if} @@ -1270,11 +1270,11 @@ {/if} {#if $appSession.isAdmin} - + {/if} diff --git a/apps/ui/src/routes/services/[id]/__layout.svelte b/apps/ui/src/routes/services/[id]/__layout.svelte index d5a56937e..03e850c6a 100644 --- a/apps/ui/src/routes/services/[id]/__layout.svelte +++ b/apps/ui/src/routes/services/[id]/__layout.svelte @@ -85,9 +85,7 @@ if (sure) { $status.service.initialLoading = true; try { - if (service.type && $status.service.isRunning) - await post(`/services/${service.id}/stop`, {}); - await del(`/services/${service.id}`, { id: service.id }); + await del(`/services/${service.id}`, {}); return await goto('/'); } catch (error) { return errorNotification(error); diff --git a/apps/ui/src/routes/services/[id]/danger.svelte b/apps/ui/src/routes/services/[id]/danger.svelte index b99b8b738..9f95c65a5 100644 --- a/apps/ui/src/routes/services/[id]/danger.svelte +++ b/apps/ui/src/routes/services/[id]/danger.svelte @@ -28,16 +28,12 @@ import { goto } from '$app/navigation'; const { id } = $page.params; - let forceDelete = false; async function deleteService() { const sure = confirm($t('application.confirm_to_delete', { name: service.name })); if (sure) { $status.service.initialLoading = true; try { - if (service.type && $status.service.overallStatus !== 'stopped') { - await post(`/services/${service.id}/stop`, {}); - } - await del(`/services/${service.id}`, { id: service.id }); + await del(`/services/${service.id}`, {}); return await goto('/'); } catch (error) { return errorNotification(error); From 85e83b5441379f7ea45b4a8742e4479bb67c7db1 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 20 Jan 2023 10:42:13 +0100 Subject: [PATCH 4/8] Test new gh actions --- .github/workflows/staging-release.yml | 64 +++++---------------------- 1 file changed, 11 insertions(+), 53 deletions(-) diff --git a/.github/workflows/staging-release.yml b/.github/workflows/staging-release.yml index c4a9988c4..43a10ac2b 100644 --- a/.github/workflows/staging-release.yml +++ b/.github/workflows/staging-release.yml @@ -12,8 +12,8 @@ on: - next jobs: - arm64: - runs-on: [self-hosted, arm64] + build: + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 @@ -31,62 +31,20 @@ jobs: - name: Get current package version uses: martinbeentjes/npm-get-version-action@v1.2.3 id: package-version + - name: Docker meta + id: staging + uses: docker/metadata-action@v3 + with: + images: coollabsio/coolify:next + tags: | + type=ref,event=branch - name: Build and push uses: docker/build-push-action@v2 with: context: . - platforms: linux/arm64 + platforms: linux/amd64,linux/arm/v7 push: true - tags: coollabsio/coolify:next-arm64 - cache-from: type=registry,ref=coollabsio/coolify:buildcache-next-arm64 - cache-to: type=registry,ref=coollabsio/coolify:buildcache-next-arm64,mode=max - amd64: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - ref: "next" - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Get current package version - uses: martinbeentjes/npm-get-version-action@v1.2.3 - id: package-version - - name: Build and push - uses: docker/build-push-action@v3 - with: - context: . - platforms: linux/amd64 - push: true - tags: coollabsio/coolify:next-amd64 - cache-from: type=registry,ref=coollabsio/coolify:buildcache-next-amd64 - cache-to: type=registry,ref=coollabsio/coolify:buildcache-next-amd64,mode=max - merge-manifest: - runs-on: ubuntu-latest - needs: [arm64, amd64] - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Create & publish manifest - run: | - docker manifest create coollabsio/coolify:next --amend coollabsio/coolify:next-amd64 --amend coollabsio/coolify:next-arm64 - docker manifest push coollabsio/coolify:next + tags: ${{ steps.staging.outputs.tags }} - uses: sarisia/actions-status-discord@v1 if: always() with: From b4d9fe70afa3745efee5e0828be3994dba8000b9 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 20 Jan 2023 10:43:21 +0100 Subject: [PATCH 5/8] fix --- .github/workflows/staging-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/staging-release.yml b/.github/workflows/staging-release.yml index 43a10ac2b..5a8ecd465 100644 --- a/.github/workflows/staging-release.yml +++ b/.github/workflows/staging-release.yml @@ -35,7 +35,7 @@ jobs: id: staging uses: docker/metadata-action@v3 with: - images: coollabsio/coolify:next + images: coollabsio/coolify tags: | type=ref,event=branch - name: Build and push From 012d4dae564c9cda81885697e34b9d8fc3c936f7 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 20 Jan 2023 11:15:38 +0100 Subject: [PATCH 6/8] testing --- .github/workflows/staging-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/staging-release.yml b/.github/workflows/staging-release.yml index 5a8ecd465..b830f5913 100644 --- a/.github/workflows/staging-release.yml +++ b/.github/workflows/staging-release.yml @@ -13,7 +13,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: [self-hosted, arm64] steps: - name: Checkout uses: actions/checkout@v3 From e3462251363b9f77e3770bb688915e393f082e08 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 20 Jan 2023 13:10:40 +0100 Subject: [PATCH 7/8] fix --- .github/workflows/staging-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/staging-release.yml b/.github/workflows/staging-release.yml index b830f5913..195089043 100644 --- a/.github/workflows/staging-release.yml +++ b/.github/workflows/staging-release.yml @@ -13,7 +13,7 @@ on: jobs: build: - runs-on: [self-hosted, arm64] + runs-on: [self-hosted] steps: - name: Checkout uses: actions/checkout@v3 From 2141d54ae086c9ec9dbb9c057b83f9eab30713d8 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 20 Jan 2023 13:15:52 +0100 Subject: [PATCH 8/8] fix --- .github/workflows/staging-release.yml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/.github/workflows/staging-release.yml b/.github/workflows/staging-release.yml index 195089043..2f24fff03 100644 --- a/.github/workflows/staging-release.yml +++ b/.github/workflows/staging-release.yml @@ -13,7 +13,7 @@ on: jobs: build: - runs-on: [self-hosted] + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 @@ -28,23 +28,13 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Get current package version - uses: martinbeentjes/npm-get-version-action@v1.2.3 - id: package-version - - name: Docker meta - id: staging - uses: docker/metadata-action@v3 - with: - images: coollabsio/coolify - tags: | - type=ref,event=branch - name: Build and push uses: docker/build-push-action@v2 with: context: . - platforms: linux/amd64,linux/arm/v7 + platforms: linux/amd64 push: true - tags: ${{ steps.staging.outputs.tags }} + tags: coollabsio/coolify:next - uses: sarisia/actions-status-discord@v1 if: always() with: