From 577439d86e022cd2de9cfd6b4413bbad1ae73be3 Mon Sep 17 00:00:00 2001 From: Arthur Desplanches Date: Fri, 23 Feb 2024 17:02:49 +0100 Subject: [PATCH] ci: Add docker image build and release --- .github/workflows/build_and_release.yml | 35 +++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/build_and_release.yml diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml new file mode 100644 index 0000000..ded0e50 --- /dev/null +++ b/.github/workflows/build_and_release.yml @@ -0,0 +1,35 @@ +name: "build_and_release" + +on: + release: + types: + - published + +jobs: + build_and_release: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository }} + - name: Log in to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push to container registry + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} +