Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: old way of building the image #120

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 28 additions & 16 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -60,30 +68,34 @@ 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"

- name: Run test conversion of urn:decentraland:off-chain:base-avatars:brown_pants
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 \
--pointer urn:decentraland:off-chain:base-avatars:brown_pants \
--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 }}"
Expand Down
Loading