From c97f2498e2c308ca09541b0cd0967f87ab3ec6d4 Mon Sep 17 00:00:00 2001 From: morthimer Date: Sat, 11 May 2024 18:59:24 +0200 Subject: [PATCH] Add build workflow --- .gitea/workflows/build.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .gitea/workflows/build.yaml diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..519927e --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,32 @@ +name: Build morthimer/caddy-homelab image +on: [push] +env: + REPOSITORY: git.int.morthimer.fr:8443 + +job: + lint: + runs-on: ubuntu-latest + steps: + - name: Repository checkout + uses: actions/checkout@v4 + - name: Lint Dockerfile with Hadolint + uses: hadolint/hadolint-action@v3.1.0 + with: + dockerfile: Dockerfile + + build: + needs: lint + runs-on: ubuntu-latest + steps: + - name: Repository login + uses: docker/login-action@v3 + with: + registry: $REPOSITORY + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push image + uses: docker/build-push-action@v5 + with: + push: true + tags: $REPOSITORY/${{ gitea.repository }}:latest \ No newline at end of file