moved building prod docker to new workflow

This commit is contained in:
Naterfute
2025-09-16 01:15:50 -07:00
parent bf81acb357
commit a7e51759cd
2 changed files with 41 additions and 35 deletions

View File

@@ -4,8 +4,6 @@ on:
push:
branches:
- main
tags:
- '*'
release:
types:
- published
@@ -93,36 +91,3 @@ jobs:
generate_release_notes: true
draft: false
prerelease: false
build-release:
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push release image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }}
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:main
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
BUILDKIT_INLINE_CACHE=1

41
.github/workflows/prod-build.yaml vendored Normal file
View File

@@ -0,0 +1,41 @@
name: Build prod Docker
on:
push:
tags:
- 'releases/*'
permissions:
packages: write
jobs:
build-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push release image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }}
ghcr.io/${{ github.repository }}:latest
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
BUILDKIT_INLINE_CACHE=1