name: Docker Build on: push: paths-ignore: - "**.md" branches: - 'main' - 'master' jobs: build-docker: runs-on: ubuntu-latest strategy: matrix: config: - { platform: 'linux/amd64', tag: 'latest', dockerfile: 'Dockerfile' } - { platform: 'linux/arm64', tag: 'latest-arm', dockerfile: 'Dockerfile.arm' } - { platform: 'linux/arm/v7', tag: 'latest-armv7', dockerfile: 'Dockerfile.armv7' } steps: - name: Checkout sources uses: actions/checkout@v3 - name: Set up QEMU uses: docker/setup-qemu-action@v2 with: platforms: all - name: Set up Docker Buildx id: buildx uses: docker/setup-buildx-action@v2 with: version: latest - name: Login to Quay.io uses: docker/login-action@v3 with: registry: quay.io username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_ROBOT_TOKEN }} - name: push README to Quay.io uses: christian-korneck/update-container-description-action@v1 env: DOCKER_APIKEY: ${{ secrets.APIKEY__QUAY_IO }} with: destination_container_repo: quay.io/redlib/redlib provider: quay readme_file: 'README.md' - name: Build and push uses: docker/build-push-action@v5 with: context: . file: ./${{ matrix.config.dockerfile }} platforms: ${{ matrix.config.platform }} push: true tags: quay.io/redlib/redlib:${{ matrix.config.tag }} cache-from: type=gha cache-to: type=gha,mode=max