From 4d9125f20e88dfbe43d6745855a0b2a43bdcfb95 Mon Sep 17 00:00:00 2001 From: seemywings Date: Thu, 23 May 2024 13:43:01 +0100 Subject: [PATCH] actions --- .github/README.md | 5 +++ .github/workflows/dockerBuildX.yml | 51 ++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 .github/README.md create mode 100644 .github/workflows/dockerBuildX.yml diff --git a/.github/README.md b/.github/README.md new file mode 100644 index 0000000..14ab529 --- /dev/null +++ b/.github/README.md @@ -0,0 +1,5 @@ +Ponder +------- +###### OpenAI Powered Chat Tool +[![main](https://github.com/pluralsh/pluralia/actions/workflows/dockerBuildX.yml/badge.svg?branch=main)](https://github.com/pluralsh/pluralia/actions/workflows/dockerBuildX.yml) + diff --git a/.github/workflows/dockerBuildX.yml b/.github/workflows/dockerBuildX.yml new file mode 100644 index 0000000..6554777 --- /dev/null +++ b/.github/workflows/dockerBuildX.yml @@ -0,0 +1,51 @@ +name: Docker BuildX + +on: + push: + branches: + - "develop" + tags: + - "**" + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: GitHub Checkout + uses: actions/checkout@v3 + + - name: Docker Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Docker Set up Buildx + uses: docker/setup-buildx-action@v2 + + - name: Docker Login + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Docker Extract metadata (tags, labels) + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build and push + uses: docker/build-push-action@v4 + with: + context: . + push: true + platforms: linux/amd64,linux/arm/v7 + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}