name: Push Docker on: push: tags: - '*.*.*' jobs: docker: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Buildx uses: docker/setup-buildx-action@v3 - name: Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build image uses: docker/build-push-action@v5 with: context: . push: true platforms: linux/amd64,linux/arm64 tags: | ${{ vars.DOCKERHUB_TARGET }}:latest ${{ vars.DOCKERHUB_TARGET }}:${{ github.ref_name }} # for this project, we have a php image variant - name: Build php image uses: docker/build-push-action@v5 with: context: . file: Dockerfile.php push: true platforms: linux/amd64,linux/arm64 tags: | ${{ vars.DOCKERHUB_TARGET }}:latest-php ${{ vars.DOCKERHUB_TARGET }}:${{ github.ref_name }}-php