65
.github/workflows/publish_docker_images.yml
vendored
65
.github/workflows/publish_docker_images.yml
vendored
@ -8,7 +8,7 @@ on:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build-amd:
|
||||
env:
|
||||
DATABASE_URL: 'postgresql://'
|
||||
strategy:
|
||||
@ -30,6 +30,9 @@ jobs:
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- if: github.event_name != 'pull_request'
|
||||
name: Log in to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
@ -38,11 +41,67 @@ jobs:
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build image
|
||||
uses: docker/build-push-action@v3
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
context: .
|
||||
tags: ${{ steps.image-meta.outputs.tags }}
|
||||
labels: ${{ steps.image-meta.outputs.labels }}
|
||||
platforms: linux/amd64
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
build-args: |
|
||||
SCOPE=${{ matrix.app }}
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
|
||||
build-arm:
|
||||
env:
|
||||
DATABASE_URL: 'postgresql://'
|
||||
strategy:
|
||||
matrix:
|
||||
app: ['builder', 'viewer']
|
||||
runs-on: buildjet-2vcpu-ubuntu-2204-arm
|
||||
steps:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Extract existing image metadata
|
||||
id: image-meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: baptistearno/typebot-${{ matrix.app }}
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- if: github.event_name != 'pull_request'
|
||||
name: Log in to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build image
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
context: .
|
||||
tags: ${{ steps.image-meta.outputs.tags }}
|
||||
labels: ${{ steps.image-meta.outputs.labels }}
|
||||
platforms: linux/arm64
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
build-args: |
|
||||
SCOPE=${{ matrix.app }}
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
|
Reference in New Issue
Block a user