From 28d9c7434bb7c990f938d1711a897979c4ff6f20 Mon Sep 17 00:00:00 2001 From: MrLetsplay Date: Fri, 1 Nov 2024 18:51:52 +0100 Subject: [PATCH] Add workflow --- .gitea/workflows/build.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..98fc24d --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,35 @@ +name: Build and push container +run-name: ${{ gitea.actor }} is building the container +on: [push] + +jobs: + Build-Docker-Container: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to registry + uses: docker/login-action@v3 + with: + registry: hub.docker.com + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: mrletsplay/mdblog + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + file: docker/Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}