From 4dc33a22afc7f7a7af4457954b22708816e28e9a 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.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .gitea/workflows/build-container.yaml diff --git a/.gitea/workflows/build-container.yaml b/.gitea/workflows/build-container.yaml new file mode 100644 index 0000000..d8b867a --- /dev/null +++ b/.gitea/workflows/build-container.yaml @@ -0,0 +1,26 @@ +name: Build and Push Docker Image + +on: + push: + branches: + - '**' + +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 .devcontainer/Dockerfile + + - name: Push Docker image + run: | + docker push git.silklaasboer.nl/${{ secrets.DOCKER_USERNAME }}/devcontainer:latest \ No newline at end of file