Skip to content

Commit

Permalink
Update devcontainer on release
Browse files Browse the repository at this point in the history
  • Loading branch information
tarrencev committed Apr 16, 2024
1 parent c0548a4 commit 276061d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,11 @@ RUN if [ "$TARGETPLATFORM" = "linux/arm64" ] ; then \
rustup target add x86_64-fortanix-unknown-sgx --toolchain nightly; \
fi

ARG DOJO_VERSION=stable
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 dojoup
RUN dojoup -v $DOJO_VERSION

RUN chown -R root:root /usr/local/cargo
RUN chmod -R 700 /usr/local/cargo
7 changes: 5 additions & 2 deletions .github/workflows/devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- ".devcontainer/**"
- ".github/workflows/devcontainer.yml"
- "!.devcontainer/devcontainer.json"
release:
types: [published]

jobs:
build-and-push:
Expand Down Expand Up @@ -56,6 +58,7 @@ jobs:
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' }}
platforms: linux/amd64,linux/arm64
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}-dev:latest

Expand Down Expand Up @@ -85,8 +88,8 @@ jobs:
with:
# We have to use a PAT in order to trigger ci
token: ${{ secrets.CREATE_PR_TOKEN }}
title: "Update devcontainer image hash: ${{ needs.build-and-push.outputs.tag_name }}"
commit-message: "Update devcontainer image hash: ${{ needs.build-and-push.outputs.tag_name }}"
title: "Update devcontainer image: ${{ needs.build-and-push.outputs.tag_name }}"
commit-message: "Update devcontainer image: ${{ needs.build-and-push.outputs.tag_name }}"
branch: bump-devcontainer
base: main
delete-branch: true

0 comments on commit 276061d

Please sign in to comment.