Docker Image CI #443
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docker Image CI | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| schedule: | |
| - cron: '0 0 * * *' | |
| jobs: | |
| push_to_registry: | |
| name: Build and push Docker images to Docker Hub | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| debian_release: [bullseye, bookworm, trixie] | |
| include: | |
| - debian_release: trixie | |
| tags: midwan/amiberry-debian-aarch64:trixie,midwan/amiberry-debian-aarch64:latest | |
| - debian_release: bookworm | |
| tags: midwan/amiberry-debian-aarch64:bookworm | |
| - debian_release: bullseye | |
| tags: midwan/amiberry-debian-aarch64:bullseye | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v4 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| build-args: debian_release=${{ matrix.debian_release }} | |
| context: . | |
| file: ./Dockerfile | |
| push: true | |
| tags: ${{ matrix.tags }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |