diff --git a/.gitea/workflows/docker.yml b/.gitea/workflows/docker.yml new file mode 100644 index 0000000..e62e748 --- /dev/null +++ b/.gitea/workflows/docker.yml @@ -0,0 +1,44 @@ +name: Push Docker + +on: + push: + tags: + - '[0-9.].?[0-9]?.?[0-9]?' + +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 standard 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 }} + + - 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