Skip to content

I2::Release::Publish #76

I2::Release::Publish

I2::Release::Publish #76

Workflow file for this run

name: I2::Release::Publish
on:
push:
tags:
- 'v2*'
env:
CARGO_TERM_COLOR: always
DOCKER_COMPOSE_PATH: configs/swarm
jobs:
registry:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
install: true
- name: Get the release tag
run: |
RELEASE_VERSION=${{ github.ref_name }}
PREFIX='v'
TAG=${RELEASE_VERSION#$PREFIX}
echo "TAG=$TAG" >>$GITHUB_ENV
- name: Build and export to Docker iroha2 image
uses: docker/build-push-action@v5
if: always()
with:
context: .
load: true
file: Dockerfile
tags: |
hyperledger/iroha:${{ env.TAG }}
docker.soramitsu.co.jp/iroha2/iroha:${{ env.TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Test docker-compose.single.yml before pushing
run: |
docker compose -f ${{ env.DOCKER_COMPOSE_PATH }}/docker-compose.single.yml up --wait || exit 1
docker compose -f ${{ env.DOCKER_COMPOSE_PATH }}/docker-compose.single.yml down
- name: Test docker-compose.local.yml before pushing
run: |
docker compose -f ${{ env.DOCKER_COMPOSE_PATH }}/docker-compose.local.yml up --wait || exit 1
docker compose -f ${{ env.DOCKER_COMPOSE_PATH }}/docker-compose.local.yml down
- name: Test docker-compose.yml before pushing
run: |
docker compose -f ${{ env.DOCKER_COMPOSE_PATH }}/docker-compose.yml up --wait || exit 1
docker compose -f ${{ env.DOCKER_COMPOSE_PATH }}/docker-compose.yml down
- name: Login to DockerHub
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: Build and push iroha2 image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
hyperledger/iroha:${{ env.TAG }}
docker.soramitsu.co.jp/iroha2/iroha:${{ env.TAG }}
labels: commit=${{ github.sha }}
configs:
runs-on: ubuntu-latest
container:
image: hyperledger/iroha2-ci:nightly-2024-04-18
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: iroha2-dev
token: ${{ secrets.G_ACCESS_TOKEN }}
- name: Update configs
run: |
./scripts/update_configs.sh lts
./scripts/update_configs.sh stable
- name: Commit config changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: '[documentation]: Update lts/stable configs following a release'
branch: iroha2-dev
commit_options: '--signoff'
commit_user_name: sorabot
commit_user_email: <>
commit_author: sorabot <[email protected]>