Docker Image CI #32
This file contains 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: | |
push: | |
branches: master | |
schedule: | |
- cron: '34 4 * * 0' | |
jobs: | |
verify: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- | |
name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- | |
name: Available platforms | |
run: echo ${{ steps.buildx.outputs.platforms }} | |
- | |
name: Run Buildx (build only) | |
if: ${{ github.repository == 'OmerTu/GoogleHomeKodi'}} | |
run: | | |
docker buildx build \ | |
--platform linux/amd64 \ | |
--output "type=image,push=false" \ | |
--file Dockerfile . | |
- | |
name: Login to Docker Hub | |
if: ${{ github.repository != 'OmerTu/GoogleHomeKodi'}} | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USER }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Run Buildx (build and push) | |
if: ${{ github.repository != 'OmerTu/GoogleHomeKodi'}} | |
run: | | |
docker buildx build \ | |
--platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \ | |
--output "type=image,push=true" \ | |
--tag ${{secrets.DOCKER_IMAGENAME}}:latest \ | |
--file Dockerfile . |