diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..f2bab3f --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,31 @@ +name: Build and Deploy Docker + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v4 + + - name: Log in to GHCR + uses: docker/login-action@v3 + with: + registry: git.rhost.ovh + username: ${{ github.actor }} + password: ${{ secrets.TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: git.rhost.ovh/${{ github.repository }}:latest \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 41bcdff..c8c977b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,10 @@ services: cron: - image: registry.docker.rhost.ovh/updateip:0.0.2 + image: git.rhost.ovh/ryjek/update-homelab-ip:0.0.1 platform: linux/x86_64 build: context: . - dockerfile: Dockerfile + dockerfile: service/Dockerfile restart: on-failure command: > bash -c "printenv > /etc/environment && cron -f"