diff --git a/.forgejo/workflows/main.yml b/.forgejo/workflows/main.yml index 11c4a02..02ec1e3 100644 --- a/.forgejo/workflows/main.yml +++ b/.forgejo/workflows/main.yml @@ -4,32 +4,38 @@ run-name: Build and Push Docker Image on: push: branches: - - main + - main workflow_dispatch: {} schedule: - - cron: '0 20 * * 5' + - cron: '0 20 * * 5' jobs: build-and-push: + # The runner with this label must have Docker installed to be able to run service containers. runs-on: node + services: + dind: + image: docker:24-dind + options: --privileged steps: - - name: Checkout - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + - name: Set up Docker Builder + # This action will automatically use the 'dind' service as the build server. + uses: docker/setup-buildx-action@v3 - - name: Login to Forgejo Registry - uses: docker/login-action@v3 - with: - registry: ${{ secrets.CI_REGISTRY }} - username: ${{ secrets.CI_REGISTRY_USER }} - password: ${{ secrets.CI_TOKEN }} + - name: Login to Forgejo Registry + uses: docker/login-action@v3 + with: + registry: ${{ secrets.CI_REGISTRY }} + username: ${{ secrets.CI_REGISTRY_USER }} + password: ${{ secrets.CI_TOKEN }} - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: . - platforms: linux/amd64 - push: true - tags: ${{ secrets.CI_REGISTRY }}/${{ secrets.CI_REPOSITORY }}:latest + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/amd64 + push: true + tags: ${{ secrets.CI_REGISTRY }}/${{ secrets.CI_REPOSITORY }}:latest