From 7a442b063136ba5ae5fbbe678ec6d871d5caaccd Mon Sep 17 00:00:00 2001 From: Crovaxon Date: Fri, 21 Jun 2024 01:13:44 +0200 Subject: [PATCH] Changed repository to new public URL, added a workflow to daily check base image for updates and push --- .../build-docker-image-and-push.yaml | 9 ++--- .gitea/workflows/check-docker-image.yaml | 35 +++++++++++++++++++ 2 files changed, 37 insertions(+), 7 deletions(-) create mode 100644 .gitea/workflows/check-docker-image.yaml diff --git a/.gitea/workflows/build-docker-image-and-push.yaml b/.gitea/workflows/build-docker-image-and-push.yaml index 39338a2..b3032f9 100644 --- a/.gitea/workflows/build-docker-image-and-push.yaml +++ b/.gitea/workflows/build-docker-image-and-push.yaml @@ -17,17 +17,12 @@ jobs: name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 with: -# buildkitd-flags: --debug -# config-inline: | -# [registry."127.0.0.1:5000"] -# http = true -# insecure = true driver-opts: network=host - name: Login to Gitea uses: docker/login-action@v3 with: - registry: 127.0.0.1:3001 + registry: gitea.crovaxon.de username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_PASS }} - @@ -36,4 +31,4 @@ jobs: with: context: . push: true - tags: 127.0.0.1:3001/crovaxon/foundryvtt-docker \ No newline at end of file + tags: gitea.crovaxon.de/crovaxon/foundryvtt-docker \ No newline at end of file diff --git a/.gitea/workflows/check-docker-image.yaml b/.gitea/workflows/check-docker-image.yaml new file mode 100644 index 0000000..717447a --- /dev/null +++ b/.gitea/workflows/check-docker-image.yaml @@ -0,0 +1,35 @@ +name: Check docker image + +on: + schedule: + - cron: '0 6 * * *' + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Check if update available + id: check + uses: lucacome/docker-image-update-checker@v1 + with: + base-image: node:20-alpine + image: gitea.crovaxon.de/crovaxon/foundryvtt-docker:latest + + name: Login to Gitea + uses: docker/login-action@v3 + with: + registry: gitea.crovaxon.de + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASS }} + if: steps.check.outputs.needs-updating == 'true' + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: gitea.crovaxon.de/crovaxon/foundryvtt-docker + if: steps.check.outputs.needs-updating == 'true' \ No newline at end of file