From e9c6fe4f14dba2376c1ac1af85283b146c7005b1 Mon Sep 17 00:00:00 2001 From: BAStos525 <66615487+BAStos525@users.noreply.github.com> Date: Thu, 9 Nov 2023 22:18:09 +0300 Subject: [PATCH] [ci]: Add iroha2 stable tag only publishing (#4044) Signed-off-by: BAStos525 --- .github/workflows/iroha2-ci-image.yml | 6 +++--- .github/workflows/iroha2-dev-nightly.yml | 6 +++--- .github/workflows/iroha2-dev-pr-label.yml | 4 ++-- .github/workflows/iroha2-dev-pr-static.yml | 2 +- .github/workflows/iroha2-dev-pr-ui.yml | 2 +- .github/workflows/iroha2-dev-pr-wasm.yaml | 2 +- .github/workflows/iroha2-dev-pr.yml | 10 +++++----- .github/workflows/iroha2-dev.yml | 14 +++++++------- .github/workflows/iroha2-release-pr.yml | 10 +++++----- .github/workflows/iroha2-release.yml | 15 ++++++++------- 10 files changed, 36 insertions(+), 35 deletions(-) diff --git a/.github/workflows/iroha2-ci-image.yml b/.github/workflows/iroha2-ci-image.yml index 400681ffc40..c7721b6e6d2 100644 --- a/.github/workflows/iroha2-ci-image.yml +++ b/.github/workflows/iroha2-ci-image.yml @@ -6,13 +6,13 @@ jobs: dockerhub: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: docker/login-action@v2 + - uses: actions/checkout@v4 + - uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push iroha2-ci image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: push: true tags: hyperledger/iroha2-ci:nightly-2023-06-25 diff --git a/.github/workflows/iroha2-dev-nightly.yml b/.github/workflows/iroha2-dev-nightly.yml index 766cbdc4403..94f98f711c8 100644 --- a/.github/workflows/iroha2-dev-nightly.yml +++ b/.github/workflows/iroha2-dev-nightly.yml @@ -8,13 +8,13 @@ jobs: container: image: hyperledger/iroha2-ci:nightly-2023-06-25 steps: - - uses: actions/checkout@v3 - - uses: docker/login-action@v2 + - uses: actions/checkout@v4 + - uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push iroha2:dev-nightly image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: push: true tags: hyperledger/iroha2:dev-nightly-${{ github.sha }} diff --git a/.github/workflows/iroha2-dev-pr-label.yml b/.github/workflows/iroha2-dev-pr-label.yml index 166621dee97..cbf581bd692 100644 --- a/.github/workflows/iroha2-dev-pr-label.yml +++ b/.github/workflows/iroha2-dev-pr-label.yml @@ -11,7 +11,7 @@ jobs: api-changes: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: jitterbit/get-changed-files@v1 continue-on-error: true id: api_label @@ -25,7 +25,7 @@ jobs: config-changes: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: jitterbit/get-changed-files@v1 continue-on-error: true id: config_label diff --git a/.github/workflows/iroha2-dev-pr-static.yml b/.github/workflows/iroha2-dev-pr-static.yml index f52c204935c..7fadced88d1 100644 --- a/.github/workflows/iroha2-dev-pr-static.yml +++ b/.github/workflows/iroha2-dev-pr-static.yml @@ -22,7 +22,7 @@ jobs: container: image: hyperledger/iroha2-ci:nightly-2023-06-25 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: Swatinem/rust-cache@v2 - name: Format diff --git a/.github/workflows/iroha2-dev-pr-ui.yml b/.github/workflows/iroha2-dev-pr-ui.yml index 7d70feafb86..603b1331c5a 100644 --- a/.github/workflows/iroha2-dev-pr-ui.yml +++ b/.github/workflows/iroha2-dev-pr-ui.yml @@ -30,7 +30,7 @@ jobs: run: | sudo rm -rf /usr/share/dotnet sudo rm -rf "$AGENT_TOOLSDIRECTORY" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: Swatinem/rust-cache@v2 - name: Run tests, with ${{ matrix.feature_flag }} run: | diff --git a/.github/workflows/iroha2-dev-pr-wasm.yaml b/.github/workflows/iroha2-dev-pr-wasm.yaml index 2e77e2a7c63..a5019907ccd 100644 --- a/.github/workflows/iroha2-dev-pr-wasm.yaml +++ b/.github/workflows/iroha2-dev-pr-wasm.yaml @@ -27,7 +27,7 @@ jobs: container: image: hyperledger/iroha2-ci:nightly-2023-06-25 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: Swatinem/rust-cache@v2 - name: Install iroha_wasm_test_runner run: cargo install --path tools/wasm_test_runner diff --git a/.github/workflows/iroha2-dev-pr.yml b/.github/workflows/iroha2-dev-pr.yml index 74b031fab90..b78ede1a64a 100644 --- a/.github/workflows/iroha2-dev-pr.yml +++ b/.github/workflows/iroha2-dev-pr.yml @@ -23,7 +23,7 @@ jobs: container: image: hyperledger/iroha2-ci:nightly-2023-06-25 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: Swatinem/rust-cache@v2 - name: Check config.md if: always() @@ -94,7 +94,7 @@ jobs: image: hyperledger/iroha2-ci:nightly-2023-06-25 timeout-minutes: 60 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: Swatinem/rust-cache@v2 - name: Run tests run: mold --run cargo test -p iroha_client --tests --no-default-features unstable_network --quiet @@ -107,9 +107,9 @@ jobs: container: image: hyperledger/iroha2-ci:nightly-2023-06-25 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Login to Soramitsu Harbor - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: docker.soramitsu.co.jp username: ${{ secrets.HARBOR_USERNAME }} @@ -138,7 +138,7 @@ jobs: image: hyperledger/iroha2-ci:nightly-2023-06-25 timeout-minutes: 60 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: Swatinem/rust-cache@v2 - name: Build binaries run: | diff --git a/.github/workflows/iroha2-dev.yml b/.github/workflows/iroha2-dev.yml index b2c1d0ec98e..995581a61af 100644 --- a/.github/workflows/iroha2-dev.yml +++ b/.github/workflows/iroha2-dev.yml @@ -13,13 +13,13 @@ jobs: container: image: hyperledger/iroha2-ci:nightly-2023-06-25 steps: - - uses: actions/checkout@v3 - - uses: docker/login-action@v2 + - uses: actions/checkout@v4 + - uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to Soramitsu Harbor - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: docker.soramitsu.co.jp username: ${{ secrets.HARBOR_USERNAME }} @@ -27,11 +27,11 @@ jobs: - name: Set up Docker Buildx id: buildx if: always() - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 with: install: true - name: Build and push iroha2:dev image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 if: always() with: push: true @@ -51,7 +51,7 @@ jobs: container: image: hyperledger/iroha2-ci:nightly-2023-06-25 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: Swatinem/rust-cache@v2 - name: Build run: mold --run cargo build --release --verbose @@ -87,7 +87,7 @@ jobs: container: image: hyperledger/iroha2-ci:nightly-2023-06-25 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: Swatinem/rust-cache@v2 - name: Run debug tests and save telemetry env: diff --git a/.github/workflows/iroha2-release-pr.yml b/.github/workflows/iroha2-release-pr.yml index c1bec06cc51..d877366d1b0 100644 --- a/.github/workflows/iroha2-release-pr.yml +++ b/.github/workflows/iroha2-release-pr.yml @@ -21,7 +21,7 @@ jobs: image: hyperledger/iroha2-ci:nightly-2023-06-25 timeout-minutes: 60 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: Swatinem/rust-cache@v2 - name: Install and configure allurectl uses: allure-framework/setup-allurectl@v1 @@ -66,7 +66,7 @@ jobs: run: | sudo rm -rf /usr/share/dotnet sudo rm -rf "$AGENT_TOOLSDIRECTORY" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: Swatinem/rust-cache@v2 - name: Run benchmarks run: mold --run cargo bench --workspace --quiet @@ -82,9 +82,9 @@ jobs: run: | sudo rm -rf /usr/share/dotnet sudo rm -rf "$AGENT_TOOLSDIRECTORY" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK 11 - uses: actions/setup-java@v3.11.0 + uses: actions/setup-java@v3.13.0 with: java-version: '11' distribution: 'temurin' @@ -136,6 +136,6 @@ jobs: run: | sudo rm -rf /usr/share/dotnet sudo rm -rf "$AGENT_TOOLSDIRECTORY" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run long tests run: mold --run cargo test --workspace --no-fail-fast -- --ignored --test-threads=1 long diff --git a/.github/workflows/iroha2-release.yml b/.github/workflows/iroha2-release.yml index 596e97b6239..8395c54af48 100644 --- a/.github/workflows/iroha2-release.yml +++ b/.github/workflows/iroha2-release.yml @@ -13,10 +13,10 @@ jobs: container: image: hyperledger/iroha2-ci:nightly-2023-06-25 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 with: install: true - name: Get tag from branch name @@ -30,21 +30,22 @@ jobs: RELEASE=$(curl -s https://raw.githubusercontent.com/hyperledger/iroha/${{ github.ref_name }}/Cargo.toml | sed -n '3p' | sed -e 's/version = "//g' -e 's/"$//' | tr -d '\n') echo "RELEASE=$RELEASE" >>$GITHUB_ENV - name: Login to DockerHub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to Soramitsu Harbor - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: docker.soramitsu.co.jp username: ${{ secrets.HARBOR_USERNAME }} password: ${{ secrets.HARBOR_TOKEN }} - name: Build and push iroha2 image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: push: true tags: | + hyperledger/iroha2:${{ env.TAG }} hyperledger/iroha2:${{ env.TAG }}-${{ env.RELEASE }} docker.soramitsu.co.jp/iroha2/iroha2:${{ env.TAG }}-${{ env.RELEASE }} labels: commit=${{ github.sha }} @@ -62,7 +63,7 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: iroha2-dev token: ${{ secrets.G_ACCESS_TOKEN }} @@ -71,7 +72,7 @@ jobs: ./scripts/update_configs.sh lts ./scripts/update_configs.sh stable - name: Commit config changes - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: '[documentation]: Update lts/stable configs following a release' branch: iroha2-dev