Skip to content

Commit

Permalink
Merge branch 'dojoengine:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Yogalholic authored May 16, 2024
2 parents 599b6cb + de3b2e5 commit da71a89
Show file tree
Hide file tree
Showing 32 changed files with 487 additions and 342 deletions.
12 changes: 8 additions & 4 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,19 @@ RUN if [ "$TARGETPLATFORM" = "linux/arm64" ] ; then \
fi

ARG DOJO_VERSION=stable
ARG BUILD_TYPE=default
RUN curl -L https://install.dojoengine.org | bash
RUN curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | bash
ENV PATH=${PATH}:/root/.dojo/bin
RUN if [ "$DOJO_VERSION" = "stable" ]; then \
echo "Installing latest stable version of Dojo"; \
dojoup; \
else \
RUN if [ "$BUILD_TYPE" = "release" ]; then \
echo "Installing Dojo version $DOJO_VERSION"; \
dojoup -v $DOJO_VERSION; \
elif [ "$BUILD_TYPE" = "push" ]; then \
echo "Installing Dojo at commit $DOJO_VERSION"; \
dojoup -c $DOJO_VERSION; \
else \
echo "Installing latest stable version of Dojo"; \
dojoup; \
fi

RUN chown -R root:root /usr/local/cargo
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
- ".github/workflows/devcontainer.yml"
- "!.devcontainer/devcontainer.json"
release:
types: [created]
types: [published]

jobs:
build-and-push:
Expand Down Expand Up @@ -64,19 +64,20 @@ jobs:
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
push: true
push: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/')) }}
file: .devcontainer/Dockerfile
tags: ghcr.io/${{ github.repository }}-dev:latest,ghcr.io/${{ github.repository }}-dev:${{ env.DOCKER_TAG }}
build-args: |
VARIANT=bookworm
DOJO_VERSION=${{ github.event_name == 'release' && github.event.release.tag_name || 'stable' }}
BUILD_TYPE=${{ github.event_name }}
DOJO_VERSION=${{ github.event.release.tag_name }}
platforms: linux/amd64,linux/arm64
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}-dev:latest

propose-update-pr:
needs: build-and-push
runs-on: ubuntu-latest
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'create' && startsWith(github.ref, 'refs/tags/'))
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/'))
permissions:
pull-requests: write
contents: write
Expand Down
Loading

0 comments on commit da71a89

Please sign in to comment.