Skip to content
This repository was archived by the owner on Oct 5, 2022. It is now read-only.
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
Simplify docker image creation workflow
  • Loading branch information
jeluard committed Aug 25, 2020
commit 87f70c66f28011ce5f8a5856c45c9c98a74c85b1
32 changes: 1 addition & 31 deletions .github/workflows/build-push-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,10 @@ jobs:
if: ${{ github.repository == 'substrate-developer-hub/substrate-node-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 }}"}'
client-payload: '{"id": "node-template"}'