rebuild_backup_image.yml 989 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. name: Build mailcow backup image
  2. on:
  3. schedule:
  4. # At 00:00 on Sunday
  5. - cron: "0 0 * * 0"
  6. workflow_dispatch: # Allow to run workflow manually
  7. jobs:
  8. docker_image_build:
  9. runs-on: ubuntu-latest
  10. permissions:
  11. packages: write
  12. steps:
  13. - name: Checkout
  14. uses: actions/checkout@v5
  15. - name: Set up QEMU
  16. uses: docker/setup-qemu-action@v3
  17. - name: Set up Docker Buildx
  18. uses: docker/setup-buildx-action@v3
  19. - name: Login to GHCR
  20. if: github.event_name != 'pull_request'
  21. uses: docker/login-action@v3
  22. with:
  23. registry: ghcr.io
  24. username: ${{ github.repository_owner }}
  25. password: ${{ secrets.GITHUB_TOKEN }}
  26. - name: Build and push
  27. uses: docker/build-push-action@v6
  28. with:
  29. context: .
  30. platforms: linux/amd64,linux/arm64
  31. file: data/Dockerfiles/backup/Dockerfile
  32. push: true
  33. tags: ghcr.io/mailcow/backup:latest