name: Build Apprise API Image on: push: branches: master tags: - v* jobs: buildx: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Docker meta id: docker_meta uses: docker/metadata-action@v5 with: images: | docker.io/caronc/apprise tags: | type=semver,event=tag,pattern={{version}} type=semver,event=tag,pattern={{major}}.{{minor}} type=edge,branch=master - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Check pushing to Docker Hub id: push-other-places # Only push to Dockerhub from the main repo # Otherwise forks would require a Docker Hub account and secrets setup run: | if [[ ${{ github.repository_owner }} == "caronc" ]] ; then echo "Enabling DockerHub image push" echo "enable=true" >> $GITHUB_OUTPUT else echo "Not pushing to DockerHub" echo "enable=false" >> $GITHUB_OUTPUT fi - name: Login to DockerHub uses: docker/login-action@v3 # Don't attempt to login is not pushing to Docker Hub if: steps.push-other-places.outputs.enable == 'true' with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push uses: docker/build-push-action@v5 with: context: . platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }}