From f90a98c4f91f7013338b62c538802e01254a0329 Mon Sep 17 00:00:00 2001 From: TheAssassin Date: Mon, 22 Apr 2024 00:14:57 +0200 Subject: [PATCH] Build Docker image with Gitea actions --- .gitea/workflows/docker.yml | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .gitea/workflows/docker.yml diff --git a/.gitea/workflows/docker.yml b/.gitea/workflows/docker.yml new file mode 100644 index 0000000..f6e8265 --- /dev/null +++ b/.gitea/workflows/docker.yml @@ -0,0 +1,40 @@ +name: Build and publish Docker image +on: [push] + +env: + REGISTRY: git.newpipe-ev.de + # make sure the name is lowercase, otherwise Docker won't accept it + IMAGE_NAME: newpipe-ev/website + +jobs: + build: + runs-on: ubuntu-latest + + permissions: + contents: read + + steps: + - uses: actions/checkout@v3 + + - name: Log in to registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + platforms: | + linux/amd64