From ca2aeefbd4f979edbcef45ac22a9b5f81712d80e Mon Sep 17 00:00:00 2001 From: Mikolaj Gasior Date: Thu, 2 Feb 2023 11:56:37 +0100 Subject: [PATCH 1/4] Extend push-foundation-repo workflow to push release branches and tags --- .github/workflows/push-foundation-repo.yml | 71 ++++++++++++++++++++-- 1 file changed, 67 insertions(+), 4 deletions(-) diff --git a/.github/workflows/push-foundation-repo.yml b/.github/workflows/push-foundation-repo.yml index 5af41ef9ed..8dc0257063 100644 --- a/.github/workflows/push-foundation-repo.yml +++ b/.github/workflows/push-foundation-repo.yml @@ -2,16 +2,79 @@ name: Sync Cardinal-Cryptography repo with Aleph-Zero-Foundation repo on: push: - branches: [main] + branches: + - main + - release-** + tags: + - r-* jobs: - sync: + sync-main: runs-on: ubuntu-20.04 - if: ${{ github.repository == 'Cardinal-Cryptography/aleph-node'}} + if: github.repository == 'Cardinal-Cryptography/aleph-node' && startsWith(github.ref, 'refs/heads/') && github.ref_name == 'main' steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v2 with: fetch-depth: 0 token: ${{ secrets.SYNCAZF }} + - name: Push to Aleph-Zero-Foundation run: git push https://x-access-token:${{ secrets.SYNCAZF }}@github.com/aleph-zero-foundation/aleph-node.git + + + sync-release-branch: + runs-on: ubuntu-20.04 + if: github.repository == 'Cardinal-Cryptography/aleph-node' && startsWith(github.ref, 'refs/heads/') && startsWith(github.ref_name, 'release-') + steps: + - name: GIT | Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + token: ${{ secrets.SYNCAZF }} + + - name: Get branch name and commit SHA + id: get_branch + shell: bash + env: + HEAD_REF: ${{ github.ref }} + run: | + echo branch_name=$(echo ${HEAD_REF#refs/heads/}) >> $GITHUB_OUTPUT + echo sha_short=$(git rev-parse --short HEAD) >> $GITHUB_OUTPUT + + - name: Push to Aleph-Zero-Foundation + run: | + git remote add mirror 'https://x-access-token:${{ secrets.SYNCAZF }}@github.com/aleph-zero-foundation/aleph-node.git' + git push mirror ${{ steps.get_branch.outputs.branch_name }}:${{ steps.get_branch.outputs.branch_name }} + + + sync-release-tag: + runs-on: ubuntu-20.04 + if: github.repository == 'Cardinal-Cryptography/aleph-node' && startsWith(github.ref, 'refs/tags/') + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Get tag name and commit SHA + id: get_branch + shell: bash + env: + HEAD_REF: ${{ github.ref }} + run: | + echo tag_name=$(echo ${HEAD_REF#refs/tags/}) >> $GITHUB_OUTPUT + echo sha_short=$(git rev-parse --short HEAD) >> $GITHUB_OUTPUT + + - name: Checkout Aleph-Zero-Foundation repository + uses: actions/checkout@v3 + with: + repository: aleph-zero-foundation/aleph-node + token: "${{ secrets.SYNCAZF }}" + path: aleph-zero-foundation-aleph-node + fetch-depth: 0 + + - name: Checkout commit SHA and add tag in Aleph-Zero-Foundation repository + run: | + cd aleph-zero-foundation-aleph-node/ + git checkout "${{ steps.get_branch.outputs.sha_short }}" + git tag "${{ steps.get_branch.outputs.tag_name }}" + git push origin "${{ steps.get_branch.outputs.tag_name }}" From 0d4ec5ebb072f5946874f4425e125ed5b936a27c Mon Sep 17 00:00:00 2001 From: Mikolaj Gasior Date: Sun, 5 Feb 2023 22:10:55 +0100 Subject: [PATCH 2/4] Change 'git push' command to use URL instead of adding mirror --- .github/workflows/push-foundation-repo.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/push-foundation-repo.yml b/.github/workflows/push-foundation-repo.yml index 8dc0257063..afd43e44aa 100644 --- a/.github/workflows/push-foundation-repo.yml +++ b/.github/workflows/push-foundation-repo.yml @@ -44,8 +44,7 @@ jobs: - name: Push to Aleph-Zero-Foundation run: | - git remote add mirror 'https://x-access-token:${{ secrets.SYNCAZF }}@github.com/aleph-zero-foundation/aleph-node.git' - git push mirror ${{ steps.get_branch.outputs.branch_name }}:${{ steps.get_branch.outputs.branch_name }} + git push 'https://x-access-token:${{ secrets.SYNCAZF }}@github.com/aleph-zero-foundation/aleph-node.git' ${{ steps.get_branch.outputs.branch_name }}:${{ steps.get_branch.outputs.branch_name }} sync-release-tag: From 394df12332f53eaaebfa0028d0c14991cbc346d1 Mon Sep 17 00:00:00 2001 From: Piotr K Date: Wed, 8 Feb 2023 17:09:14 +0100 Subject: [PATCH 3/4] Fixed version of actions/checkout --- .github/workflows/push-foundation-repo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-foundation-repo.yml b/.github/workflows/push-foundation-repo.yml index afd43e44aa..5632c8487e 100644 --- a/.github/workflows/push-foundation-repo.yml +++ b/.github/workflows/push-foundation-repo.yml @@ -14,7 +14,7 @@ jobs: if: github.repository == 'Cardinal-Cryptography/aleph-node' && startsWith(github.ref, 'refs/heads/') && github.ref_name == 'main' steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 token: ${{ secrets.SYNCAZF }} From bba224196a04359af4a7979705f89ed38570fbd1 Mon Sep 17 00:00:00 2001 From: Michal Swietek Date: Thu, 9 Feb 2023 13:50:25 +0100 Subject: [PATCH 4/4] Change libssl version in cliain. --- bin/cliain/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cliain/Dockerfile b/bin/cliain/Dockerfile index 9c123ed38c..afd520a97e 100644 --- a/bin/cliain/Dockerfile +++ b/bin/cliain/Dockerfile @@ -11,8 +11,8 @@ RUN apt update && \ RUN update-ca-certificates -RUN wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb -RUN dpkg -i libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb +RUN wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb +RUN dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb COPY target/release/cliain /usr/local/bin RUN chmod +x /usr/local/bin/cliain