Skip to content

Commit

Permalink
move collator local docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
demisx committed Sep 14, 2022
1 parent b69a3ff commit 127e21f
Show file tree
Hide file tree
Showing 12 changed files with 192 additions and 255 deletions.
100 changes: 0 additions & 100 deletions .github/workflows/main-v2.yml.xxx

This file was deleted.

47 changes: 27 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Build Main
jobs:
build_prep:
name: build-prep
runs-on: 'ubuntu-latest'
runs-on: "ubuntu-latest"
outputs:
matrix: ${{ steps.set-build-param.outputs.matrix }}
steps:
Expand All @@ -16,9 +16,9 @@ jobs:
- id: set-build-param
uses: JoshuaTheMiller/conditional-build-matrix@b9af2b1b137d7bd7818c1233ef830b326809a7cc
with:
inputFile: '.github/workflows/build-params.json'
inputFile: ".github/workflows/build-params.json"
# we run build-node on every workflow but build-runtime only on pushes to branches
filter: '[?run_on_event==`any` || run_on_event==`${{ github.event_name }}`]'
filter: "[?run_on_event==`any` || run_on_event==`${{ github.event_name }}`]"
build:
needs: build_prep
strategy:
Expand All @@ -27,6 +27,7 @@ jobs:
runs-on: ${{ matrix.os }}
env:
RUST_TOOLCHAIN: ${{ matrix.rust_toolchain }}
DOCKER_HUB_PROFILE: frequencychain
steps:
- name: Free space on Ubuntu
if: ${{ matrix.os }} == 'ubuntu-latest'
Expand All @@ -47,8 +48,8 @@ jobs:
- if: matrix.target == 'build-runtime' || matrix.target == 'build-runtime-rococo'
uses: Swatinem/rust-cache@v1
with: # cache the runtime target instead of root target for build-runtime
working-directory: './runtime'
target-dir: './target/frequency'
working-directory: "./runtime"
target-dir: "./target/frequency"
- if: matrix.target == 'build-node'
uses: Swatinem/rust-cache@v1
- name: ${{ matrix.target }}
Expand Down Expand Up @@ -76,36 +77,42 @@ jobs:
date_tag=$(date +'%Y%m%d-%H%M')
echo ${date_tag}
echo "TAG=${date_tag}" >> $GITHUB_ENV
- name: Build and push Frequency image
- name: Generate Frequency local chain spec
if: matrix.target == 'build-node'
id: docker_build_frequency
run: ./scripts/generate_specs.sh 2000 rococo-2000
- name: Build and push Frequency local collator image
if: matrix.target == 'build-node'
env:
IMAGE_NAME: collator-node-local
uses: docker/build-push-action@v3
with:
context: .
push: true
file: Dockerfile
file: docker/${{env.IMAGE_NAME}}.dockerfile
tags: |
frequencychain/frequency:${{ env.TAG }}
frequencychain/frequency:latest
- name: Build and push Frequency image in instant seal mode
${{env.DOCKER_HUB_PROFILE}}/${{env.IMAGE_NAME}}:${{ env.TAG }}
${{env.DOCKER_HUB_PROFILE}}/${{env.IMAGE_NAME}}:latest
- name: Build and push Frequency local collator image in instant seal mode
if: matrix.target == 'build-node'
id: docker_build_instant_seal_node
env:
IMAGE_NAME: instant-seal-node
uses: docker/build-push-action@v3
with:
context: .
push: true
file: ./docker/instant-seal-node.dockerfile
file: ./docker/${{env.IMAGE_NAME}}.dockerfile
tags: |
frequencychain/instant-seal-node:${{env.TAG}}
frequencychain/instant-seal-node:latest
- name: Build and push Frequency image for Rococo testnet and Mainnet
${{env.DOCKER_HUB_PROFILE}}/${{env.IMAGE_NAME}}:${{env.TAG}}
${{env.DOCKER_HUB_PROFILE}}/${{env.IMAGE_NAME}}:latest
- name: Build and push Frequency parachain image for Rococo testnet and Mainnet
if: matrix.target == 'build-node'
id: docker_build_frequency
env:
IMAGE_NAME: parachain-node
uses: docker/build-push-action@v3
with:
context: .
push: true
file: ./docker/parachain-node.dockerfile
file: ./docker/${{env.IMAGE_NAME}}.dockerfile
tags: |
frequencychain/parachain-node:${{ env.TAG }}
frequencychain/parachain-node:latest
${{env.DOCKER_HUB_PROFILE}}/${{env.IMAGE_NAME}}:${{ env.TAG }}
${{env.DOCKER_HUB_PROFILE}}/${{env.IMAGE_NAME}}:latest
Loading

0 comments on commit 127e21f

Please sign in to comment.