Skip to content

Commit

Permalink
ci(testnet): enable workflows on the target branch
Browse files Browse the repository at this point in the history
Signed-off-by: Shunkichi Sato <[email protected]>
  • Loading branch information
s8sato committed Jan 17, 2025
1 parent 20fb323 commit e2e6581
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/iroha2-dev-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push iroha:dev-nightly image
- name: Build and push iroha:testnet-2.0.0-rc.1-nightly image
uses: docker/build-push-action@v6
with:
push: true
tags: hyperledger/iroha:dev-nightly-${{ github.sha }}
tags: hyperledger/iroha:testnet-2.0.0-rc.1-nightly-${{ github.sha }}
labels: commit=${{ github.sha }}
build-args: TAG=dev
# This context specification is required
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/iroha2-dev-pr-static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: I2::Dev::Static

on:
pull_request:
branches: [ main ]
branches: [testnet/2.0.0-rc.1]
paths:
- '**.rs'
- '**.json'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/iroha2-dev-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: I2::Dev::Title

on:
pull_request_target:
branches: [main]
branches: [testnet/2.0.0-rc.1]
types: [opened, edited, synchronize, reopened]

permissions:
Expand Down Expand Up @@ -46,4 +46,4 @@ jobs:
uses: marocchino/sticky-pull-request-comment@v2
with:
header: pr-title-lint-error
delete: true
delete: true
2 changes: 1 addition & 1 deletion .github/workflows/iroha2-dev-pr-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: I2::Dev::Wasm

on:
pull_request:
branches: [main]
branches: [testnet/2.0.0-rc.1]
paths:
- '.github/workflows/iroha2-dev-pr-wasm.yaml'

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/iroha2-dev-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: I2::Dev::Tests

on:
pull_request:
branches: [main]
branches: [testnet/2.0.0-rc.1]
paths:
- '**.rs'
- '**.json'
Expand Down Expand Up @@ -160,12 +160,12 @@ jobs:
uses: docker/setup-buildx-action@v2
with:
install: true
- name: Build and push iroha:dev image
- name: Build and push iroha:testnet-2.0.0-rc.1 image
uses: docker/build-push-action@v6
if: always()
with:
push: true
tags: docker.soramitsu.co.jp/iroha2/iroha:dev-${{ github.event.pull_request.head.sha }}
tags: docker.soramitsu.co.jp/iroha2/iroha:testnet-2.0.0-rc.1-${{ github.event.pull_request.head.sha }}
labels: commit=${{ github.sha }}
build-args: TAG=dev
file: Dockerfile.glibc
Expand Down Expand Up @@ -214,7 +214,7 @@ jobs:
file: Dockerfile.glibc
tags: |
hyperledger/iroha:local
hyperledger/iroha:dev
hyperledger/iroha:testnet-2.0.0-rc.1
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Test docker-compose.single.yml
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/iroha2-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: I2::Dev::Publish

on:
push:
branches: [main]
branches: [testnet/2.0.0-rc.1]

env:
CARGO_TERM_COLOR: always
Expand Down Expand Up @@ -58,24 +58,24 @@ jobs:
registry: docker.soramitsu.co.jp
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_TOKEN }}
- name: Build and push iroha:dev image
- name: Build and push iroha:testnet-2.0.0-rc.1 image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.glibc
push: true
tags: |
hyperledger/iroha:dev
docker.soramitsu.co.jp/iroha2/iroha:dev
hyperledger/iroha:testnet-2.0.0-rc.1
docker.soramitsu.co.jp/iroha2/iroha:testnet-2.0.0-rc.1
labels: commit=${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Copy artifacts from iroha image
run: |
mkdir -p ${{ env.ARTIFACTS_DIR }}
docker run --rm --entrypoint cat hyperledger/iroha:dev ${{ env.BIN_PATH }}/iroha > ${{ env.ARTIFACTS_DIR }}/iroha
docker run --rm --entrypoint cat hyperledger/iroha:dev ${{ env.BIN_PATH }}/irohad > ${{ env.ARTIFACTS_DIR }}/irohad
docker run --rm --entrypoint cat hyperledger/iroha:dev ${{ env.BIN_PATH }}/kagami > ${{ env.ARTIFACTS_DIR }}/kagami
docker run --rm --entrypoint cat hyperledger/iroha:testnet-2.0.0-rc.1 ${{ env.BIN_PATH }}/iroha > ${{ env.ARTIFACTS_DIR }}/iroha
docker run --rm --entrypoint cat hyperledger/iroha:testnet-2.0.0-rc.1 ${{ env.BIN_PATH }}/irohad > ${{ env.ARTIFACTS_DIR }}/irohad
docker run --rm --entrypoint cat hyperledger/iroha:testnet-2.0.0-rc.1 ${{ env.BIN_PATH }}/kagami > ${{ env.ARTIFACTS_DIR }}/kagami
- name: Generate schema
run: cargo run --bin kagami -- schema > ${{ env.ARTIFACTS_DIR }}/schema.json
- name: Archive artifacts
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/iroha2-doc-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: I2::Doc::Links

on:
pull_request:
branches: [main, stable, lts]
branches: [testnet/2.0.0-rc.1]
paths:
- '**/*.md'
- '**/*.txt'
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/iroha2-no-incorrect-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ name: I2::CI::check_for_incorrect_images

on:
push:
branches:
- main
- stable
branches: [testnet/2.0.0-rc.1]

jobs:
check:
Expand All @@ -17,9 +15,5 @@ jobs:
- uses: actions/checkout@v4
- name: Install dependencies
run: pip install -r .github/scripts/ci_test/requirements.txt --no-input
- name: Check containers on iroha2 stable branch
if: github.base_ref == 'stable'
run: python .github/scripts/ci_test/ci_image_scan.py --allow iroha:stable -- docker-compose*.yml
- name: Check containers on iroha2 main branch
if: github.base_ref == 'main'
run: python .github/scripts/ci_test/ci_image_scan.py --allow iroha:dev -- docker-compose*.yml
- name: Check containers
run: python .github/scripts/ci_test/ci_image_scan.py --allow iroha:testnet-2.0.0-rc.1 -- docker-compose*.yml
2 changes: 1 addition & 1 deletion .github/workflows/iroha2-pr-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: I2::Tests::UI

on:
pull_request:
branches: [main, stable, lts]
branches: [testnet/2.0.0-rc.1]
paths:
- 'crates/*_derive/**.rs'
- 'crates/*_macro*/**.rs'
Expand Down

0 comments on commit e2e6581

Please sign in to comment.