diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index b2ec38c3..1f5dccad 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -36,15 +36,23 @@ jobs: - name: Set up QEMU uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_TOKEN }} + - name: Build Image - id: build-image - uses: redhat-actions/buildah-build@v2 + id: docker_build + uses: docker/build-push-action@v6 with: - image: ${{ matrix.service_name }} - layers: true - tags: next ${{ github.sha }} ${{ inputs.docker-tag }} - dockerfiles: | - ./Dockerfile + context: . + tags: quay.io/decentraland/${{ matrix.service_name }}:next,quay.io/decentraland/${{ matrix.service_name }}:${{ github.sha }} + load: true build-args: | COMMIT_HASH=${{ github.sha }} UNITY_DOCKER_IMAGE=${{ matrix.unity_docker_image }} @@ -60,6 +68,7 @@ jobs: docker run \ -v $(pwd)/tmp/Unity:/root/.local/share/unity3d/Unity \ -v $(pwd):/app \ + --rm \ quay.io/decentraland/${{ matrix.service_name }}:next \ sh -c "cd /app ; ls -la ; chmod +x ci-editmode-test.sh ; ./ci-editmode-test.sh" @@ -67,6 +76,7 @@ jobs: run: | docker run \ -v $(pwd)/tmp/Unity:/root/.local/share/unity3d/Unity \ + --rm \ quay.io/decentraland/${{ matrix.service_name }}:next \ node --trace-warnings --abort-on-uncaught-exception --unhandled-rejections=strict dist/test-conversion.js \ --baseUrl https://peer.decentraland.org/content \ @@ -74,16 +84,18 @@ jobs: --outDir /tmp-ab \ --logFile /tmp-ab/log.txt - - name: Push To quay.io - id: push-to-quay - uses: redhat-actions/push-to-registry@v2 - if: ${{ github.ref == 'refs/heads/main' }} + - name: Push image + uses: docker/build-push-action@v6 +# if: ${{ github.ref == 'refs/heads/main' }} with: - image: ${{ steps.build-image.outputs.image }} - tags: ${{ steps.build-image.outputs.tags }} - registry: quay.io/decentraland - username: ${{ secrets.QUAY_USERNAME }} - password: ${{ secrets.QUAY_TOKEN }} + context: . + tags: quay.io/decentraland/${{ matrix.service_name }}:${{ github.sha }} +# push: "${{ github.ref == 'refs/heads/main' }}" + push: "true" + build-args: | + COMMIT_HASH=${{ github.sha }} + UNITY_DOCKER_IMAGE=${{ matrix.unity_docker_image }} + PLATFORM_TARGET=${{ matrix.platform_target }} - name: Print image url run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"