mirror of
https://github.com/katanemo/plano.git
synced 2026-04-27 09:46:28 +02:00
only publish to DOCR on release, not on main push
This commit is contained in:
parent
790405f6dc
commit
18a78916c8
1 changed files with 0 additions and 78 deletions
78
.github/workflows/docker-push-main.yml
vendored
78
.github/workflows/docker-push-main.yml
vendored
|
|
@ -3,8 +3,6 @@ name: Publish docker image (latest)
|
|||
env:
|
||||
DOCKER_IMAGE: katanemo/plano
|
||||
GHCR_IMAGE: ghcr.io/${{ github.repository_owner }}/plano
|
||||
DOCR_IMAGE: registry.digitalocean.com/genai-prod/plano
|
||||
DOCR_PREVIEW_IMAGE: registry.digitalocean.com/genai-preview/plano
|
||||
|
||||
on:
|
||||
push:
|
||||
|
|
@ -36,14 +34,6 @@ jobs:
|
|||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Install doctl
|
||||
uses: digitalocean/action-doctl@v2
|
||||
with:
|
||||
token: ${{ secrets.PLATFORM_DIGITALOCEAN_TOKEN }}
|
||||
|
||||
- name: Log in to DOCR (prod)
|
||||
run: doctl registry login
|
||||
|
||||
- name: Build and Push ARM64 Image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
|
|
@ -54,21 +44,6 @@ jobs:
|
|||
tags: |
|
||||
${{ env.DOCKER_IMAGE }}:latest-arm64
|
||||
${{ env.GHCR_IMAGE }}:latest-arm64
|
||||
${{ env.DOCR_IMAGE }}:latest-arm64
|
||||
|
||||
- name: Switch to DOCR preview
|
||||
uses: digitalocean/action-doctl@v2
|
||||
with:
|
||||
token: ${{ secrets.PLATFORM_DIGITALOCEAN_TOKEN_PREVIEW }}
|
||||
|
||||
- name: Log in to DOCR (preview)
|
||||
run: doctl registry login
|
||||
|
||||
- name: Push to DOCR Preview
|
||||
run: |
|
||||
docker buildx imagetools create \
|
||||
-t ${{ env.DOCR_PREVIEW_IMAGE }}:latest-arm64 \
|
||||
${{ env.DOCKER_IMAGE }}:latest-arm64
|
||||
|
||||
# Build AMD64 image on GitHub's AMD64 runner — push to both registries
|
||||
build-amd64:
|
||||
|
|
@ -90,14 +65,6 @@ jobs:
|
|||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Install doctl
|
||||
uses: digitalocean/action-doctl@v2
|
||||
with:
|
||||
token: ${{ secrets.PLATFORM_DIGITALOCEAN_TOKEN }}
|
||||
|
||||
- name: Log in to DOCR (prod)
|
||||
run: doctl registry login
|
||||
|
||||
- name: Build and Push AMD64 Image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
|
|
@ -108,21 +75,6 @@ jobs:
|
|||
tags: |
|
||||
${{ env.DOCKER_IMAGE }}:latest-amd64
|
||||
${{ env.GHCR_IMAGE }}:latest-amd64
|
||||
${{ env.DOCR_IMAGE }}:latest-amd64
|
||||
|
||||
- name: Switch to DOCR preview
|
||||
uses: digitalocean/action-doctl@v2
|
||||
with:
|
||||
token: ${{ secrets.PLATFORM_DIGITALOCEAN_TOKEN_PREVIEW }}
|
||||
|
||||
- name: Log in to DOCR (preview)
|
||||
run: doctl registry login
|
||||
|
||||
- name: Push to DOCR Preview
|
||||
run: |
|
||||
docker buildx imagetools create \
|
||||
-t ${{ env.DOCR_PREVIEW_IMAGE }}:latest-amd64 \
|
||||
${{ env.DOCKER_IMAGE }}:latest-amd64
|
||||
|
||||
# Combine ARM64 and AMD64 images into multi-arch manifests for both registries
|
||||
create-manifest:
|
||||
|
|
@ -142,14 +94,6 @@ jobs:
|
|||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Install doctl
|
||||
uses: digitalocean/action-doctl@v2
|
||||
with:
|
||||
token: ${{ secrets.PLATFORM_DIGITALOCEAN_TOKEN }}
|
||||
|
||||
- name: Log in to DOCR (prod)
|
||||
run: doctl registry login
|
||||
|
||||
- name: Create Docker Hub Multi-Arch Manifest
|
||||
run: |
|
||||
docker buildx imagetools create \
|
||||
|
|
@ -163,25 +107,3 @@ jobs:
|
|||
-t ${{ env.GHCR_IMAGE }}:latest \
|
||||
${{ env.GHCR_IMAGE }}:latest-arm64 \
|
||||
${{ env.GHCR_IMAGE }}:latest-amd64
|
||||
|
||||
- name: Create DOCR Prod Multi-Arch Manifest
|
||||
run: |
|
||||
docker buildx imagetools create \
|
||||
-t ${{ env.DOCR_IMAGE }}:latest \
|
||||
${{ env.DOCR_IMAGE }}:latest-arm64 \
|
||||
${{ env.DOCR_IMAGE }}:latest-amd64
|
||||
|
||||
- name: Switch to DOCR preview
|
||||
uses: digitalocean/action-doctl@v2
|
||||
with:
|
||||
token: ${{ secrets.PLATFORM_DIGITALOCEAN_TOKEN_PREVIEW }}
|
||||
|
||||
- name: Log in to DOCR (preview)
|
||||
run: doctl registry login
|
||||
|
||||
- name: Create DOCR Preview Multi-Arch Manifest
|
||||
run: |
|
||||
docker buildx imagetools create \
|
||||
-t ${{ env.DOCR_PREVIEW_IMAGE }}:latest \
|
||||
${{ env.DOCKER_IMAGE }}:latest-arm64 \
|
||||
${{ env.DOCKER_IMAGE }}:latest-amd64
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue