From 66f08ffefba37525f37cd308f1b57eb909c34b1b Mon Sep 17 00:00:00 2001 From: magecnion Date: Fri, 26 May 2023 13:28:49 +0200 Subject: [PATCH 01/12] add build step that provides binary to release jobs --- .github/workflows/build.yml | 51 ++++++++++++++++ .github/workflows/release-dev.yml | 59 +++++++++++++++++++ .../{build-publish-image.yml => release.yml} | 17 +++++- Dockerfile | 21 +++---- 4 files changed, 132 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/release-dev.yml rename .github/workflows/{build-publish-image.yml => release.yml} (83%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..239ed547 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,51 @@ +name: Build + +# Controls when the action will run. +on: + push: + # branches: [main, dev] + workflow_dispatch: + +jobs: + check: + runs-on: ubuntu-22.04 + steps: + # Checks-out your repository under $GITHUB_WORKSPACE + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Install linux dependencies + run: sudo apt-get install -y clang libssl-dev llvm libudev-dev protobuf-compiler + + - name: Install Rust + run: | + rustup update stable --no-self-update + rustup target add wasm32-unknown-unknown + + # Caching paths to speed up builds + - name: Cache Paths + uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + # Build binary + - name: Build + run: cargo build + + - name: Upload x86_64 linux binary to workflow + uses: actions/upload-artifact@v3 + with: + name: parachain-template-node + path: ${{ github.workspace }}/target/release/parachain-template-node + + # Check the build for benchmarking + - name: Check Build for Benchmarking + run: > + pushd node && + cargo check --features=runtime-benchmarks --release \ No newline at end of file diff --git a/.github/workflows/release-dev.yml b/.github/workflows/release-dev.yml new file mode 100644 index 00000000..f4aad867 --- /dev/null +++ b/.github/workflows/release-dev.yml @@ -0,0 +1,59 @@ +# This is an example GitHub action that will build and publish a Docker image to DockerHub +# You need to add the following secrets to your GitHub Repository or Organization to make this work +# - DOCKER_USERNAME: The username of the DockerHub account. E.g. parity +# - DOCKER_TOKEN: Access token for DockerHub, see https://docs.docker.com/docker-hub/access-tokens/. E.g. VVVVVVVV-WWWW-XXXXXX-YYYY-ZZZZZZZZZ +# The following are setup as an environment variable below +# - DOCKER_REPO: The unique name of the DockerHub repository. E.g. parity/polkadot + +name: Release Dev + +# Controls when the action will run. +on: + push: + # branches: [main, dev] + + # Triggger the workflow whenever the "Build" workflow completes + workflow_run: + workflows: [Build] + types: + - completed + workflow_dispatch: + +# Set an environment variable (that can be overriden) for the Docker Repo +env: + DOCKER_REPO: freeverseio/laos-ownership-node + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + build: + # The type of runner that the job will run on + runs-on: ubuntu-22.04 + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Check out the repo + uses: actions/checkout@v3 + + # Login to Docker hub using the credentials stored in the repository secrets + - name: Log in to Docker Hub + uses: docker/login-action@v2.1.0 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_TOKEN }} + + # Download the binary from the previous workflow + - name: Download x86_64 linux binary + uses: actions/download-artifact@v3 + with: + name: parachain-template-node + path: ${{ github.workspace }} + + # Build and push images the version tag + - name: Build and push Docker images + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: | + ${{ env.DOCKER_REPO }}:${{ github.ref_sha }} diff --git a/.github/workflows/build-publish-image.yml b/.github/workflows/release.yml similarity index 83% rename from .github/workflows/build-publish-image.yml rename to .github/workflows/release.yml index f3e574c4..e81b3679 100644 --- a/.github/workflows/build-publish-image.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,7 @@ # The following are setup as an environment variable below # - DOCKER_REPO: The unique name of the DockerHub repository. E.g. parity/polkadot -name: Build & Publish Docker Image +name: Release # Controls when the action will run. on: @@ -14,7 +14,13 @@ on: tags: # Catches v1.2.3 and v1.2.3-rc1 - v[0-9]+.[0-9]+.[0-9]+* - + + # Triggger the workflow whenever the "Build" workflow completes + workflow_run: + workflows: [Build] + types: + - completed + # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -41,6 +47,13 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_TOKEN }} + # Download the binary from the previous workflow + - name: Download x86_64 linux binary + uses: actions/download-artifact@v3 + with: + name: parachain-template-node + path: ${{ github.workspace }} + # Build and push images the version tag - name: Build and push Docker images uses: docker/build-push-action@v4 diff --git a/Dockerfile b/Dockerfile index 223a9da5..4aabff73 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,10 @@ -# This is the build stage for laos. Here we create the binary in a temporary image. -FROM docker.io/paritytech/ci-linux:production as builder - -WORKDIR /laos -COPY . /laos - -RUN rustup target add wasm32-unknown-unknown --toolchain nightly -RUN cargo build --locked --release - -# This is the 2nd stage: a very small image where we copy the laos binary." FROM docker.io/library/ubuntu:22.04 # Create user RUN useradd -m -u 1000 -U -s /bin/sh -d /laos laos # Copy binary from builder -COPY --from=builder /laos/target/release/parachain-template-node /usr/local/bin +COPY parachain-template-node /usr/local/bin # Set up directories and permissions RUN mkdir -p /data /laos/.local/share && \ @@ -27,11 +17,14 @@ RUN su laos -c '/usr/local/bin/parachain-template-node --version' # Switch to user laos USER laos +# check if executable works in this container +RUN /usr/local/bin/parachain-template-node --version + # Expose necessary ports -EXPOSE 30333 9933 9944 9615 +EXPOSE 9930 9333 9944 30333 30334 # Define volumes VOLUME ["/data"] -# Set the entrypoint -ENTRYPOINT ["/usr/local/bin/parachain-template-node"] \ No newline at end of file +# ws_port +CMD ["/usr/local/bin/parachain-template-node"] \ No newline at end of file From b8e335d87b636c40cf365c21a8d2b751af767c17 Mon Sep 17 00:00:00 2001 From: magecnion Date: Fri, 26 May 2023 21:16:40 +0200 Subject: [PATCH 02/12] add --release to cargo build command --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 239ed547..25b0e3a9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,7 @@ jobs: # Build binary - name: Build - run: cargo build + run: cargo build --release - name: Upload x86_64 linux binary to workflow uses: actions/upload-artifact@v3 From f7f2a148505da9ed35330dd0d49763920f4bc27a Mon Sep 17 00:00:00 2001 From: magecnion Date: Fri, 26 May 2023 21:28:16 +0200 Subject: [PATCH 03/12] add dependency between workflows --- .github/workflows/build.yml | 5 +---- .github/workflows/release-dev.yml | 3 +++ .github/workflows/release.yml | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 25b0e3a9..751e267b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,10 +1,7 @@ name: Build # Controls when the action will run. -on: - push: - # branches: [main, dev] - workflow_dispatch: +on: [workflow_call] jobs: check: diff --git a/.github/workflows/release-dev.yml b/.github/workflows/release-dev.yml index f4aad867..8fcb1ee0 100644 --- a/.github/workflows/release-dev.yml +++ b/.github/workflows/release-dev.yml @@ -26,6 +26,9 @@ env: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: build: + uses: ./.github/workflows/build.yml + publish: + needs: build # The type of runner that the job will run on runs-on: ubuntu-22.04 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e81b3679..8fcb5036 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,6 +31,9 @@ env: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: build: + uses: ./.github/workflows/build.yml + publish: + needs: build # The type of runner that the job will run on runs-on: ubuntu-22.04 From 40b3da895ff3e051abaa96471598156700b4ec69 Mon Sep 17 00:00:00 2001 From: magecnion Date: Sat, 27 May 2023 20:16:22 +0200 Subject: [PATCH 04/12] publish workflow resuse steps --- .github/workflows/build.yml | 37 ++++++----- .github/workflows/check.yml | 48 -------------- .../workflows/{release.yml => publish.yml} | 27 ++++---- .github/workflows/release-dev.yml | 62 ------------------- 4 files changed, 36 insertions(+), 138 deletions(-) delete mode 100644 .github/workflows/check.yml rename .github/workflows/{release.yml => publish.yml} (71%) delete mode 100644 .github/workflows/release-dev.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 751e267b..18f3c784 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,21 +4,13 @@ name: Build on: [workflow_call] jobs: - check: + build: runs-on: ubuntu-22.04 steps: # Checks-out your repository under $GITHUB_WORKSPACE - name: Checkout Code uses: actions/checkout@v3 - - name: Install linux dependencies - run: sudo apt-get install -y clang libssl-dev llvm libudev-dev protobuf-compiler - - - name: Install Rust - run: | - rustup update stable --no-self-update - rustup target add wasm32-unknown-unknown - # Caching paths to speed up builds - name: Cache Paths uses: actions/cache@v3 @@ -30,6 +22,25 @@ jobs: ~/.cargo/git/db/ target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Install linux dependencies + run: sudo apt-get install -y clang libssl-dev llvm libudev-dev protobuf-compiler + + - name: Install Rust + run: | + rustup update stable --no-self-update + rustup target add wasm32-unknown-unknown + + # Check the build + - name: Check Build + run: | + SKIP_WASM_BUILD=1 cargo check --release + + # Check the build for benchmarking + - name: Check Build for Benchmarking + run: > + pushd node && + cargo check --features=runtime-benchmarks --release # Build binary - name: Build @@ -39,10 +50,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: parachain-template-node - path: ${{ github.workspace }}/target/release/parachain-template-node - - # Check the build for benchmarking - - name: Check Build for Benchmarking - run: > - pushd node && - cargo check --features=runtime-benchmarks --release \ No newline at end of file + path: ${{ github.workspace }}/target/release/parachain-template-node \ No newline at end of file diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml deleted file mode 100644 index 51bbf02e..00000000 --- a/.github/workflows/check.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Check Set-Up, Build & Tests - -# Controls when the action will run. -on: - push: - branches: [main, dev] - pull_request: - branches: [main, dev] - workflow_dispatch: - -jobs: - check: - runs-on: ubuntu-22.04 - steps: - # Checks-out your repository under $GITHUB_WORKSPACE - - name: Checkout Code - uses: actions/checkout@v3 - - - name: Install linux dependencies - run: sudo apt-get install -y clang libssl-dev llvm libudev-dev protobuf-compiler - - - name: Install Rust - run: | - rustup update stable --no-self-update - rustup target add wasm32-unknown-unknown - - # Caching paths to speed up builds - - name: Cache Paths - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - # Check the build - - name: Check Build - run: | - SKIP_WASM_BUILD=1 cargo check --release - - # Check the build for benchmarking - - name: Check Build for Benchmarking - run: > - pushd node && - cargo check --features=runtime-benchmarks --release \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/publish.yml similarity index 71% rename from .github/workflows/release.yml rename to .github/workflows/publish.yml index 8fcb5036..d14e708f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/publish.yml @@ -1,20 +1,12 @@ -# This is an example GitHub action that will build and publish a Docker image to DockerHub -# You need to add the following secrets to your GitHub Repository or Organization to make this work -# - DOCKER_USERNAME: The username of the DockerHub account. E.g. parity -# - DOCKER_TOKEN: Access token for DockerHub, see https://docs.docker.com/docker-hub/access-tokens/. E.g. VVVVVVVV-WWWW-XXXXXX-YYYY-ZZZZZZZZZ -# The following are setup as an environment variable below -# - DOCKER_REPO: The unique name of the DockerHub repository. E.g. parity/polkadot +name: Publish -name: Release - -# Controls when the action will run. on: # Triggers the workflow on push events for tags only push: + branches: [devops/new_image_every_push] tags: # Catches v1.2.3 and v1.2.3-rc1 - v[0-9]+.[0-9]+.[0-9]+* - # Triggger the workflow whenever the "Build" workflow completes workflow_run: workflows: [Build] @@ -57,8 +49,9 @@ jobs: name: parachain-template-node path: ${{ github.workspace }} - # Build and push images the version tag - - name: Build and push Docker images + # Publish image version tag + - name: Publish docker image using tag + if: startsWith(github.event.ref, 'refs/tags/') uses: docker/build-push-action@v4 with: context: . @@ -66,3 +59,13 @@ jobs: tags: | ${{ env.DOCKER_REPO }}:${{ github.ref_name }} ${{ env.DOCKER_REPO }}:latest + # Publish image version sha + - name: Publish docker image using commit sha + if: startsWith(github.event.ref, 'refs/heads/') + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: | + ${{ env.DOCKER_REPO }}:${{ github.ref_sha }} + diff --git a/.github/workflows/release-dev.yml b/.github/workflows/release-dev.yml deleted file mode 100644 index 8fcb1ee0..00000000 --- a/.github/workflows/release-dev.yml +++ /dev/null @@ -1,62 +0,0 @@ -# This is an example GitHub action that will build and publish a Docker image to DockerHub -# You need to add the following secrets to your GitHub Repository or Organization to make this work -# - DOCKER_USERNAME: The username of the DockerHub account. E.g. parity -# - DOCKER_TOKEN: Access token for DockerHub, see https://docs.docker.com/docker-hub/access-tokens/. E.g. VVVVVVVV-WWWW-XXXXXX-YYYY-ZZZZZZZZZ -# The following are setup as an environment variable below -# - DOCKER_REPO: The unique name of the DockerHub repository. E.g. parity/polkadot - -name: Release Dev - -# Controls when the action will run. -on: - push: - # branches: [main, dev] - - # Triggger the workflow whenever the "Build" workflow completes - workflow_run: - workflows: [Build] - types: - - completed - workflow_dispatch: - -# Set an environment variable (that can be overriden) for the Docker Repo -env: - DOCKER_REPO: freeverseio/laos-ownership-node - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - build: - uses: ./.github/workflows/build.yml - publish: - needs: build - # The type of runner that the job will run on - runs-on: ubuntu-22.04 - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Check out the repo - uses: actions/checkout@v3 - - # Login to Docker hub using the credentials stored in the repository secrets - - name: Log in to Docker Hub - uses: docker/login-action@v2.1.0 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_TOKEN }} - - # Download the binary from the previous workflow - - name: Download x86_64 linux binary - uses: actions/download-artifact@v3 - with: - name: parachain-template-node - path: ${{ github.workspace }} - - # Build and push images the version tag - - name: Build and push Docker images - uses: docker/build-push-action@v4 - with: - context: . - push: true - tags: | - ${{ env.DOCKER_REPO }}:${{ github.ref_sha }} From 8f0855ab4097c7bd3e45076b080701c2ce6bb874 Mon Sep 17 00:00:00 2001 From: magecnion Date: Sat, 27 May 2023 20:47:09 +0200 Subject: [PATCH 05/12] separate build and check process --- .github/workflows/build.yml | 2 +- .github/workflows/publish.yml | 6 ++--- .github/workflows/test.yml | 42 +++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18f3c784..09b246ad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} - name: Install linux dependencies run: sudo apt-get install -y clang libssl-dev llvm libudev-dev protobuf-compiler diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d14e708f..a2112751 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,10 +3,9 @@ name: Publish on: # Triggers the workflow on push events for tags only push: - branches: [devops/new_image_every_push] + branches: [main, dev] tags: - # Catches v1.2.3 and v1.2.3-rc1 - - v[0-9]+.[0-9]+.[0-9]+* + - '*' # Triggger the workflow whenever the "Build" workflow completes workflow_run: workflows: [Build] @@ -59,6 +58,7 @@ jobs: tags: | ${{ env.DOCKER_REPO }}:${{ github.ref_name }} ${{ env.DOCKER_REPO }}:latest + # Publish image version sha - name: Publish docker image using commit sha if: startsWith(github.event.ref, 'refs/heads/') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..dd37782e --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,42 @@ +name: Test + +# Controls when the action will run. +on: + push: + +jobs: + test: + runs-on: ubuntu-22.04 + steps: + # Checks-out your repository under $GITHUB_WORKSPACE + - name: Checkout Code + uses: actions/checkout@v3 + + # Caching paths to speed up builds + - name: Cache Paths + uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }} + + - name: Install linux dependencies + run: sudo apt-get install -y clang libssl-dev llvm libudev-dev protobuf-compiler + + - name: Install Rust + run: | + rustup update stable --no-self-update + rustup target add wasm32-unknown-unknown + + # Check the build + - name: Check Build + run: | + SKIP_WASM_BUILD=1 cargo check --release + + # Test code + - name: Test + run: cargo test \ No newline at end of file From bdf16dace2a1572d78b351d75afa065d75ea6194 Mon Sep 17 00:00:00 2001 From: magecnion Date: Sat, 27 May 2023 22:03:39 +0200 Subject: [PATCH 06/12] test cache --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6dcc70c5..8d89cf67 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # Substrate Cumulus Parachain Template + A new [Cumulus](https://github.com/paritytech/cumulus/)-based Substrate node, ready for hacking ☁️.. This project is originally a fork of the From 076fc10c8b3a6d6e9a99f093593356c92e860b8f Mon Sep 17 00:00:00 2001 From: magecnion Date: Sun, 28 May 2023 09:40:56 +0200 Subject: [PATCH 07/12] fix Dockerfile --- Dockerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4aabff73..3b9c83dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,24 +1,24 @@ FROM docker.io/library/ubuntu:22.04 +# show backtraces +ENV RUST_BACKTRACE 1 + # Create user RUN useradd -m -u 1000 -U -s /bin/sh -d /laos laos -# Copy binary from builder -COPY parachain-template-node /usr/local/bin - # Set up directories and permissions RUN mkdir -p /data /laos/.local/share && \ chown -R laos:laos /data /laos/.local/share && \ ln -s /data /laos/.local/share/laos -# Check if executable works in this container -RUN su laos -c '/usr/local/bin/parachain-template-node --version' - # Switch to user laos USER laos +# copy the compiled binary to the container +COPY --chown=laos:laos --chmod=774 parachain-template-node /usr/bin/parachain-template-node + # check if executable works in this container -RUN /usr/local/bin/parachain-template-node --version +RUN /usr/bin/parachain-template-node --version # Expose necessary ports EXPOSE 9930 9333 9944 30333 30334 @@ -27,4 +27,4 @@ EXPOSE 9930 9333 9944 30333 30334 VOLUME ["/data"] # ws_port -CMD ["/usr/local/bin/parachain-template-node"] \ No newline at end of file +CMD ["/usr/bin/parachain-template-node"] \ No newline at end of file From a6ea0470def746c61860394f34173a4e6b3ea84b Mon Sep 17 00:00:00 2001 From: magecnion Date: Sun, 28 May 2023 10:05:22 +0200 Subject: [PATCH 08/12] only build at test step --- .github/workflows/build.yml | 11 ----------- .github/workflows/test.yml | 2 ++ 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 09b246ad..e64ad2ef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,17 +31,6 @@ jobs: rustup update stable --no-self-update rustup target add wasm32-unknown-unknown - # Check the build - - name: Check Build - run: | - SKIP_WASM_BUILD=1 cargo check --release - - # Check the build for benchmarking - - name: Check Build for Benchmarking - run: > - pushd node && - cargo check --features=runtime-benchmarks --release - # Build binary - name: Build run: cargo build --release diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dd37782e..da931394 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,6 +3,8 @@ name: Test # Controls when the action will run. on: push: + branches: + - '*' jobs: test: From 7ab47ecd72d3cd965a47864283ca2cf3839e5ebb Mon Sep 17 00:00:00 2001 From: magecnion Date: Sun, 28 May 2023 10:07:19 +0200 Subject: [PATCH 09/12] test step only trigger on branches --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index da931394..c8bc091c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,8 +3,7 @@ name: Test # Controls when the action will run. on: push: - branches: - - '*' + branches: '**' jobs: test: From ca934c2207fc33e137481454db22462207c37882 Mon Sep 17 00:00:00 2001 From: magecnion Date: Sun, 28 May 2023 11:02:56 +0200 Subject: [PATCH 10/12] trigger Github Actions --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 8d89cf67..6dcc70c5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # Substrate Cumulus Parachain Template - A new [Cumulus](https://github.com/paritytech/cumulus/)-based Substrate node, ready for hacking ☁️.. This project is originally a fork of the From acc9bea68c3e64c38cc2073bf5b66cd8c2daf124 Mon Sep 17 00:00:00 2001 From: magecnion Date: Sun, 28 May 2023 20:15:03 +0200 Subject: [PATCH 11/12] use entrypoint in the Dockerfile so I can pass params --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3b9c83dc..4635f16b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,4 +27,4 @@ EXPOSE 9930 9333 9944 30333 30334 VOLUME ["/data"] # ws_port -CMD ["/usr/bin/parachain-template-node"] \ No newline at end of file +ENTRYPOINT ["/usr/bin/parachain-template-node"] \ No newline at end of file From 67802c5909d0e7fca370f57423a0340330f7e316 Mon Sep 17 00:00:00 2001 From: magecnion Date: Mon, 29 May 2023 10:26:44 +0200 Subject: [PATCH 12/12] remove tag latest from Dockerfile --- .github/workflows/publish.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a2112751..11610295 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -57,7 +57,6 @@ jobs: push: true tags: | ${{ env.DOCKER_REPO }}:${{ github.ref_name }} - ${{ env.DOCKER_REPO }}:latest # Publish image version sha - name: Publish docker image using commit sha