Skip to content
This repository has been archived by the owner on Nov 20, 2021. It is now read-only.

Commit

Permalink
Merge pull request #2 from scs/upgrade-to-v2.0.0-rc5
Browse files Browse the repository at this point in the history
Upgrade to v2.0.0 rc5
  • Loading branch information
brenzi authored Sep 10, 2020
2 parents 662932f + 6db29de commit b03e829
Show file tree
Hide file tree
Showing 22 changed files with 2,614 additions and 1,315 deletions.
5 changes: 5 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM paritytech/substrate-playground-template-base:sha-ac4bc53

# Here the whole repo is already accessible at . (thanks to the inherited image)

RUN cargo build --release
18 changes: 18 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "Substrate Node template",
"dockerFile": "Dockerfile",
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"lldb.executable": "/usr/bin/lldb"
},
"extensions": [
"rust-lang.rust",
"bungcip.better-toml",
"vadimcn.vscode-lldb"
],
"forwardPorts": [
3000,
9944
],
"image": "paritytech/substrate-playground-template-node-template:sha-360f308"
}
48 changes: 48 additions & 0 deletions .github/workflows/build-push-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build and Push template

on:
push:
branches:
- master

jobs:
build-push-template:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2

- name: Build and push the node-template Docker image
uses: docker/build-push-action@v1 # https://github.com/docker/build-push-action
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
dockerfile: .devcontainer/Dockerfile
repository: paritytech/substrate-playground-template-node-template
tags: latest
add_git_labels: true
tag_with_ref: true
tag_with_sha: true

- run: echo ::set-output name=image::paritytech/substrate-playground-template-node-template:sha-${GITHUB_SHA::7}
id: env

- name: Update devcontainer.json
run: |-
t=$(mktemp)
cat .devcontainer/devcontainer.json | jq ".image = \"${{ steps.env.outputs.image }}\"" > ${t} && mv ${t} .devcontainer/devcontainer.json
- name: Commit .devcontainer.json update
uses: EndBug/add-and-commit@v4
with:
message: ":bookmark: update image"
add: ".devcontainer/devcontainer.json"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Trigger playground inclusion
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
repository: paritytech/substrate-playground
event-type: template-updated
client-payload: '{"id": "node-template", "image": "${{ steps.env.outputs.image }}"}'
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@
# These are backup files generated by rustfmt
**/*.rs.bk

.DS_Store
.DS_Store

# The cache for docker container dependency
.cargo

# The cache for chain data in container
.local
37 changes: 37 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Run ",
"type": "shell",
"command": "cargo",
"args": ["run", "--release", "--", "--dev"],
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": [
{
"owner": "rust",
"fileLocation": ["relative", "${workspaceRoot}"],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(\\d+):(\\d+)\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"endLine": 4,
"endColumn": 5,
"severity": 6,
"message": 7
}
}
]
}
]
}
Loading

0 comments on commit b03e829

Please sign in to comment.