Skip to content

Commit

Permalink
ci: use bento build action
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Nov 9, 2022
1 parent 880d8f3 commit 1d0d23b
Showing 1 changed file with 7 additions and 57 deletions.
64 changes: 7 additions & 57 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,62 +21,12 @@ jobs:
- 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: Log into the container registry
uses: docker/login-action@v2
- name: Run Bento build action
uses: bento-platform/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up development image metadata
id: meta-dev
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/bento-platform/bento_event_relay
flavor: |
latest=false
tags: |
type=raw,value=latest-dev,enable={{is_default_branch}}
type=ref,event=pr
type=sha,prefix=sha-
- name: Build and push development image
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile
push: true
tags: ${{ steps.meta-dev.outputs.tags }}
labels: ${{ steps.meta-dev.outputs.labels }}
platforms: linux/amd64,linux/arm64

- name: Set up production image metadata
id: meta
uses: docker/metadata-action@v4
if: ${{ github.event_name == 'release' }}
with:
images: |
ghcr.io/bento-platform/bento_event_relay
flavor: |
latest=true
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Build and push production image
uses: docker/build-push-action@v3
if: ${{ github.event_name == 'release' }}
with:
context: .
file: Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
registry-username: ${{ github.actor }}
registry-password: ${{ secrets.GITHUB_TOKEN }}
image-name: ghcr.io/bento-platform/bento_event_relay
development-dockerfile: Dockerfile
production-dockerfile: Dockerfile

0 comments on commit 1d0d23b

Please sign in to comment.