From 579c9968d068b6d143ae835d261642d4c6610a8c Mon Sep 17 00:00:00 2001 From: BAStos525 <66615487+BAStos525@users.noreply.github.com> Date: Wed, 24 Jan 2024 17:32:31 +0300 Subject: [PATCH] [ci]: Add glibc image publishing workflow (#4221) Signed-off-by: BAStos525 --- .github/workflows/iroha2-ci-image.yml | 9 +++- .github/workflows/iroha2-profiling-image.yml | 56 ++++++++++++++++++++ 2 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/iroha2-profiling-image.yml diff --git a/.github/workflows/iroha2-ci-image.yml b/.github/workflows/iroha2-ci-image.yml index c7721b6e6d2..dfb10142386 100644 --- a/.github/workflows/iroha2-ci-image.yml +++ b/.github/workflows/iroha2-ci-image.yml @@ -1,6 +1,11 @@ name: I2::CI::Publish -on: workflow_dispatch +on: + workflow_dispatch: + inputs: + IROHA2_CI_DOCKERFILE: + required: true + default: Dockerfile.build jobs: dockerhub: @@ -17,6 +22,6 @@ jobs: push: true tags: hyperledger/iroha2-ci:nightly-2023-06-25 labels: commit=${{ github.sha }} - file: Dockerfile.build + file: ${{ github.event.inputs.IROHA2_CI_DOCKERFILE }} # This context specification is required context: . diff --git a/.github/workflows/iroha2-profiling-image.yml b/.github/workflows/iroha2-profiling-image.yml new file mode 100644 index 00000000000..57b47eca93f --- /dev/null +++ b/.github/workflows/iroha2-profiling-image.yml @@ -0,0 +1,56 @@ +name: I2::Profiling::Publish + +on: + workflow_dispatch: + inputs: + IROHA2_IMAGE_TAG: + required: true + default: stable + IROHA2_IMAGE_RELEASE: + required: true + IROHA2_DOCKERFILE: + required: true + default: Dockerfile.glibc + IROHA2_PROFILE: + required: true + default: profiling + IROHA2_RUSTFLAGS: + required: false + default: -C force-frame-pointers=on --cfg wasm_profiling + +jobs: + registry: + runs-on: [self-hosted, Linux, iroha2-dev-push] + steps: + - 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@v3 + with: + registry: docker.soramitsu.co.jp + username: ${{ secrets.HARBOR_USERNAME }} + password: ${{ secrets.HARBOR_TOKEN }} + - name: Set up Docker Buildx + id: buildx + if: always() + uses: docker/setup-buildx-action@v3 + with: + install: true + - name: Build and push iroha2:profiling-image + uses: docker/build-push-action@v5 + if: always() + with: + push: true + tags: | + hyperledger/iroha2:${{ github.event.inputs.IROHA2_IMAGE_TAG }}-${{ github.event.inputs.IROHA2_IMAGE_RELEASE }}-profiling + docker.soramitsu.co.jp/iroha2/iroha2:${{ github.event.inputs.IROHA2_IMAGE_TAG }}-${{ github.event.inputs.IROHA2_IMAGE_RELEASE }}-profiling + labels: commit=${{ github.sha }} + build-args: | + "PROFILE=${{ github.event.inputs.IROHA2_PROFILE }}" + "RUSTFLAGS=${{ github.event.inputs.IROHA2_RUSTFLAGS }}" + file: ${{ github.event.inputs.IROHA2_DOCKERFILE }} + # This context specification is required + context: .