From 5d26f82140cdc7a2ca877512f47b91babf9bcd88 Mon Sep 17 00:00:00 2001 From: Sil Klaasboer Date: Mon, 31 Mar 2025 21:54:50 +0200 Subject: [PATCH] add automatic build of devcontainer if it changes --- .gitea/workflows/build-container.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .gitea/workflows/build-container.yml diff --git a/.gitea/workflows/build-container.yml b/.gitea/workflows/build-container.yml new file mode 100644 index 0000000..77aef74 --- /dev/null +++ b/.gitea/workflows/build-container.yml @@ -0,0 +1,27 @@ +name: Build and Push Docker Image + +on: + push: + paths: + - 'Dockerfile' + - '**/Dockerfile' + +jobs: + build-and-push: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Log into Gitea Container Registry + run: | + echo "${{ secrets.DOCKER_PASSWORD }}" | docker login git.silklaasboer.nl -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin + + - name: Build Docker image + run: | + docker build -t git.silklaasboer.nl/${{ secrets.DOCKER_USERNAME }}/devcontainer:latest . + + - name: Push Docker image + run: | + docker push git.silklaasboer.nl/${{ secrets.DOCKER_USERNAME }}/devcontainer:latest \ No newline at end of file