Skip to content

Bump versions for v0.104.0-rc1 #348

Bump versions for v0.104.0-rc1

Bump versions for v0.104.0-rc1 #348

name: Release Production
on:
push:
tags:
- 'v*'
permissions:
contents: read
defaults:
run:
shell: bash
env:
LC_ALL: C.UTF-8
jobs:
image:
strategy:
matrix:
module:
[
graphql,
grpc,
importer,
monitor,
rest,
rest-java,
rest-monitor,
rosetta,
test,
web3,
]
env:
CONTEXT: hedera-mirror-${{ matrix.module }}
IMAGE: gcr.io/mirrornode/hedera-mirror-${{ matrix.module }}
name: Publish images
runs-on: [self-hosted, linux, large, ephemeral]
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- name: Checkout Code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Get tag
run: echo "TAG=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- name: Custom monitor path
if: matrix.module == 'rest-monitor'
run: echo "CONTEXT=hedera-mirror-rest/monitoring" >> $GITHUB_ENV
- name: Install JDK
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: "temurin"
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@db19848a5fa7950289d3668fb053140cf3028d43 # v3.3.2
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@55bd3a7c6e2ae7cf1877fd1ccb9d54c0503c457c # v2.1.2
with:
credentials_json: "${{ secrets.GCR_KEY }}"
- name: Setup gcloud
uses: google-github-actions/setup-gcloud@98ddc00a17442e89a24bbf282954a3b65ce6d200 # v2.1.0
- name: Configure Docker
run: gcloud auth configure-docker gcr.io,marketplace.gcr.io
- name: Build
if: matrix.module != 'rest' && matrix.module != 'rest-monitor' && matrix.module != 'rosetta'
run: ./gradlew build -x test
- name: Setup QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
- name: Build and push images
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
with:
build-args: VERSION=${{env.TAG}}
cache-from: type=gha
cache-to: type=gha,mode=max
context: ${{env.CONTEXT}}
platforms: linux/amd64, linux/arm64
provenance: false
push: true
tags: ${{env.IMAGE}}:${{env.TAG}},${{env.IMAGE}}:latest
chart:
name: Publish charts
needs: image
runs-on: [self-hosted, linux, large, ephemeral]
permissions:
contents: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- name: Checkout Code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Publish helm chart
uses: stefanprodan/helm-gh-pages@0ad2bb377311d61ac04ad9eb6f252fb68e207260 # v1.7.0
with:
target_dir: charts
token: ${{ secrets.GITHUB_TOKEN }}
marketplace:
name: GCP Marketplace release
needs: chart
if: "!contains(github.ref, '-')"
permissions:
id-token: write
contents: read
runs-on: [self-hosted, linux, large, ephemeral]
timeout-minutes: 15
env:
MPDEV: "/home/runner/mpdev"
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Authenticate to Google Cloud
id: google-auth
uses: google-github-actions/auth@55bd3a7c6e2ae7cf1877fd1ccb9d54c0503c457c # v2.1.2
with:
workload_identity_provider: "projects/798248771094/locations/global/workloadIdentityPools/default-pool/providers/gh-provider"
service_account: "[email protected]"
- name: Set GCloud CLI
uses: google-github-actions/setup-gcloud@98ddc00a17442e89a24bbf282954a3b65ce6d200 # v2.1.0
- name: Authorize Docker
run: gcloud auth configure-docker
- name: Install k3d
run: curl --retry 3 -fsL https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash
- name: Create k3d cluster
run: k3d cluster create mirror --agents 1 --wait --image rancher/k3s:v1.29.3-k3s1
- name: Get tag
run: echo "TAG=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- name: Install kubectl
run: curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
- name: Install mpdev
run:
docker run gcr.io/cloud-marketplace-tools/k8s/dev cat /scripts/dev > ${MPDEV}
&& chmod +x ${MPDEV}
- name: Install application
run: kubectl apply -f "https://raw.githubusercontent.com/GoogleCloudPlatform/marketplace-k8s-app-tools/master/crd/app-crd.yaml"
- name: Build images
run: ./release.sh "${TAG}"
working-directory: charts/marketplace/gcp
- name: Install marketplace app
run: ${MPDEV} verify --deployer=gcr.io/mirror-node-public/hedera-mirror-node/deployer:${TAG}