From d3a9b8d94be1786fe91c91f523a28c9d305bcf9d Mon Sep 17 00:00:00 2001 From: Carlos Camacho Date: Thu, 21 Nov 2024 17:02:56 +0100 Subject: [PATCH] CI: build llm-load-test image on every merge This commit builds a container image with each code change and stores it in the GH registry. --- .github/workflows/build.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..f729fa4b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,37 @@ +--- +name: publish +on: [push] +permissions: + contents: read + packages: write +env: + REGISTRY_USER: ${{ github.actor }} + REGISTRY_PASSWORD: ${{ github.token }} + IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} +jobs: + build: + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python-version: [3.9] + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Buildah build + id: build-image + uses: redhat-actions/buildah-build@v2 + with: + image: ${{ github.event.repository.name }} + tags: latest ${{ github.sha }} + containerfiles: | + ./build/Containerfile + - name: Push To ghcr.io + id: push-to-ghcr + uses: redhat-actions/push-to-registry@v2 + with: + image: ${{ steps.build-image.outputs.image }} + tags: ${{ steps.build-image.outputs.tags }} + username: ${{ env.REGISTRY_USER }} + password: ${{ env.REGISTRY_PASSWORD }} + registry: ${{ env.IMAGE_REGISTRY }}