-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 945da68
Showing
5 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: "Validate devcontainer-feature.json files" | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
|
||
jobs: | ||
validate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: "Validate devcontainer-feature.json files" | ||
uses: devcontainers/action@v1 | ||
with: | ||
validate-only: "true" | ||
base-path-to-features: "./features" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# NEAR Dev Containers | ||
|
||
A collection of dev containers and features designed for working with NEAR in various contexts. | ||
|
||
## Usage | ||
|
||
To use a feature from this repository, add it to a devcontainer.json. You can read more about devcontainer features here: https://containers.dev/features | ||
|
||
## Compatibility | ||
|
||
Note that all these images depend on having the rust feature set up (`ghcr.io/devcontainers/features/rust:1`), as well as using either `debian:latest` or `ubuntu:latest` as the base image since the default devcontainer image causes issues with permissions. | ||
|
||
## Features | ||
|
||
| Feature | OCI Image | Description | | ||
| Cargo Near | TODO | Installs [Cargo Near](https://github.com/near/cargo-near) - Cargo extension for building near-sdk-rs smart contracts and ABI schemas on NEAR | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Cargo Near (cargo-near) | ||
|
||
A feature to install cargo-near | ||
|
||
## Example Usage | ||
|
||
```json | ||
"features": { | ||
"": {} // TODO | ||
} | ||
``` | ||
|
||
## Options | ||
|
||
| Options Id | Description | Type | Default Value | | ||
| ---------- | ----------- | ---- | ------------- | | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "Cargo Near", | ||
"id": "cargo-near", | ||
"version": "0.1.0", | ||
"description": "A feature to install cargo-near", | ||
"options": {}, | ||
"installsAfter": ["ghcr.io/devcontainers/features/rust", "ghcr.io/lee-orr/rusty-dev-containers/cargo-binstall"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
if ! (which rustup > /dev/null && which cargo > /dev/null); then | ||
which curl > /dev/null || (apt update && apt install curl -y -qq) | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
source $HOME/.cargo/env | ||
fi | ||
|
||
dpkg -l | grep build-essential || (apt update && apt install build-essential -y -qq) | ||
|
||
if ! cargo install --list | grep "cargo-binstall" > /dev/null; then | ||
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash | ||
fi | ||
|
||
cargo binstall cargo-near --locked -y |