Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame^] | 1 | name: Build mailcow backup image |
| 2 | |
| 3 | on: |
| 4 | schedule: |
| 5 | # At 00:00 on Sunday |
| 6 | - cron: "0 0 * * 0" |
| 7 | workflow_dispatch: # Allow to run workflow manually |
| 8 | |
| 9 | jobs: |
| 10 | docker_image_build: |
| 11 | runs-on: ubuntu-latest |
| 12 | steps: |
| 13 | - name: Checkout |
| 14 | uses: actions/checkout@v3 |
| 15 | |
| 16 | - name: Set up QEMU |
| 17 | uses: docker/setup-qemu-action@v2 |
| 18 | |
| 19 | - name: Set up Docker Buildx |
| 20 | uses: docker/setup-buildx-action@v2 |
| 21 | |
| 22 | - name: Login to Docker Hub |
| 23 | uses: docker/login-action@v2 |
| 24 | with: |
| 25 | username: ${{ secrets.BACKUPIMAGEBUILD_ACTION_DOCKERHUB_USERNAME }} |
| 26 | password: ${{ secrets.BACKUPIMAGEBUILD_ACTION_DOCKERHUB_TOKEN }} |
| 27 | |
| 28 | - name: Build and push |
| 29 | uses: docker/build-push-action@v3 |
| 30 | with: |
| 31 | context: . |
| 32 | file: data/Dockerfiles/backup/Dockerfile |
| 33 | push: true |
| 34 | tags: mailcow/backup:latest |