From 427db7be2b29eeac297c00dcb6c09e98e075452a Mon Sep 17 00:00:00 2001 From: David Lougheed Date: Thu, 24 Nov 2022 09:22:39 -0500 Subject: [PATCH] docs: example yaml --- README.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/README.md b/README.md index 031553f..8bf9842 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,40 @@ # bento_build_action GitHub CI composite action to build development and production containers for Bento components. + +To use this in a Bento service repository, create a GitHub Actions workflow +which looks something like the following: + +```yaml +name: Build and push bento_my_cool_service +on: + release: + types: [ published ] + pull_request: + branches: + - master + push: + branches: + - master + +jobs: + build-push: + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Run Bento build action + uses: bento-platform/bento_build_action@v0.7 + with: + registry: ghcr.io + registry-username: ${{ github.actor }} + registry-password: ${{ secrets.GITHUB_TOKEN }} + image-name: ghcr.io/bento-platform/bento_my_cool_service + development-dockerfile: dev.Dockerfile + dockerfile: Dockerfile +```