Skip to content

Commit

Permalink
[ci] add I2::Profiling::Publish workflow
Browse files Browse the repository at this point in the history
Signed-off-by: BAStos525 <[email protected]>
  • Loading branch information
BAStos525 committed Jan 24, 2024
1 parent cd31f16 commit 4116468
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 10 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/iroha2-ci-image.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
name: I2::CI::Publish

on: workflow_dispatch
on:
workflow_dispatch:
inputs:
IROHA2_CI_DOCKERFILE:
required: true
default: Dockerfile.build

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-2022-12-22
tags: hyperledger/iroha2-ci:nightly-2024-01-12
labels: commit=${{ github.sha }}
file: Dockerfile.build
file: ${{ github.event.inputs.IROHA2_CI_DOCKERFILE }}
# This context specification is required
context: .
8 changes: 4 additions & 4 deletions .github/workflows/iroha2-dev-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ jobs:
dockerhub:
runs-on: ubuntu-latest
container:
image: hyperledger/iroha2-ci:nightly-2022-12-22
image: hyperledger/iroha2-ci:nightly-2024-01-12
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 }}
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/iroha2-profiling-image.yml
Original file line number Diff line number Diff line change
@@ -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: .

0 comments on commit 4116468

Please sign in to comment.