diff --git a/.forgejo/workflows/docker.yml b/.forgejo/workflows/docker.yml new file mode 100644 index 0000000..126e792 --- /dev/null +++ b/.forgejo/workflows/docker.yml @@ -0,0 +1,34 @@ +name: Build and Push Docker Image + +on: + push: + branches: + - main + schedule: + # Run every Sunday at 00:00 UTC (adjust cron syntax as needed) + - cron: "0 0 * * 0" + +jobs: + docker: + runs-on: docker + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Log in to Docker Registry + uses: docker/login-action@v3 + with: + registry: git.k4li.de + # username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.FORGEJO_ACCESSTOKEN }} + + - name: Build and Push Docker Image + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64 + push: true + tags: | + docker/caddy:latest + docker/caddy:${{ github.sha }}