diff --git a/.gitea/workflows/ docker-image.deploy.beta.yml b/.gitea/workflows/ docker-image.deploy.beta.yml deleted file mode 100644 index 7ca4b8c..0000000 --- a/.gitea/workflows/ docker-image.deploy.beta.yml +++ /dev/null @@ -1,33 +0,0 @@ -on: - push: - branches: [ feature/* ] - paths: - - "docker/**" - - ".gitea/**" - schedule: - - cron: "0 02 * * *" -jobs: - - build-docker-image: - runs-on: ubuntu-latest - - steps: - - - name: Checkout code - uses: actions/checkout@v2 - - - name: Log in to git.limbosolutions.com docker registry - uses: docker/login-action@v3 - with: - registry: git.limbosolutions.com - username: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_USERNAME }} - password: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_PASSWORD }} - - - name: Build and push Docker images - id: push - uses: docker/build-push-action@v6 - with: - context: . - file: ${{gitea.workspace}}/docker/Dockerfile - push: true - tags: git.limbosolutions.com/kb/borg-backup:alpha \ No newline at end of file diff --git a/.gitea/workflows/ docker-image.deploy.prod.yml b/.gitea/workflows/ docker-image.deploy.prod.yml deleted file mode 100644 index 3ccebba..0000000 --- a/.gitea/workflows/ docker-image.deploy.prod.yml +++ /dev/null @@ -1,33 +0,0 @@ -on: - push: - branches: [ main ] - paths: - - "docker/**" - - ".gitea/**" - schedule: - - cron: "0 02 * * *" -jobs: - - build-docker-image: - runs-on: ubuntu-latest - - steps: - - - name: Checkout code - uses: actions/checkout@v2 - - - name: Log in to git.limbosolutions.com docker registry - uses: docker/login-action@v3 - with: - registry: git.limbosolutions.com - username: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_USERNAME }} - password: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_PASSWORD }} - - - name: Build and push Docker images - id: push - uses: docker/build-push-action@v6 - with: - context: . - file: ${{gitea.workspace}}/docker/Dockerfile - push: true - tags: git.limbosolutions.com/kb/borg-backup \ No newline at end of file diff --git a/.gitea/workflows/ docker-image.deploy.yml b/.gitea/workflows/ docker-image.deploy.yml new file mode 100644 index 0000000..52b6645 --- /dev/null +++ b/.gitea/workflows/ docker-image.deploy.yml @@ -0,0 +1,35 @@ +on: + push: + branches: [ main ] + paths: + - "docker/**" + - ".gitea/**" + schedule: + - cron: "0 16 * * SUN" # Sunday at 4PM +jobs: + + build-docker-image: + runs-on: ["oci-image-builder", "amd64"] + + steps: + + - name: Fetch limbo public actions + env: + RUNNER_TEMP: "${{ runner.temp }}" + WORKSPACE: "${{ gitea.workspace }}" + run: | + curl -fsSL https://git.limbosolutions.com/kb/gitea/raw/branch/main/cloud-scripts/setup-limbo-actions.sh | bash 2>&1 + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Build and push Docker Image + uses: ./.gitea/limbo_actions/buildkit-build-push + with: + registry_addr: ${{ vars.GITLIMBO_DOCKER_REGISTRY_ADDRESS }} + registry_username: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_USERNAME }} + registry_password: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_PASSWORD }} + buildkit_addr: ${{ vars.BUILDKIT_ADDRESS }} + dockerfile: ${{gitea.workspace}}/docker + tags: git.limbosolutions.com/kb/borg-backup +