Skip to content

Bump securego/gosec from 8658b8eab6c8fa98fd180f718b1961718e0dce48 to … #3649

Bump securego/gosec from 8658b8eab6c8fa98fd180f718b1961718e0dce48 to …

Bump securego/gosec from 8658b8eab6c8fa98fd180f718b1961718e0dce48 to … #3649

name: Release Integration
on:
push:
branches:
- "main"
permissions:
contents: write
defaults:
run:
shell: bash
env:
LC_ALL: C.UTF-8
jobs:
publish:
strategy:
matrix:
project:
- graphql
- grpc
- importer
- monitor
- rest
- rest-java
- rest-monitor
- rosetta
- test
- web3
env:
CONTEXT: hedera-mirror-${{ matrix.project }}
IMAGE: gcr.io/mirrornode/hedera-mirror-${{ matrix.project }}
runs-on: [self-hosted, linux, large, ephemeral]
steps:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
egress-policy: audit
- name: Checkout Code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Get version
run: echo "VERSION=$(grep -oP 'version=\K.+' gradle.properties)" >> $GITHUB_ENV
- name: Custom monitor path
if: matrix.project == '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.project != 'rest' && matrix.project != 'rest-monitor' && matrix.project != 'rosetta'
run: ./gradlew :${{matrix.project}}: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.VERSION}}
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.VERSION}},${{env.IMAGE}}:main,${{env.IMAGE}}:main-${{ github.sha }}"
deploy:
needs: publish
runs-on: [self-hosted, linux, large, ephemeral]
steps:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
ref: deploy
- name: Update integration deployment configuration
run: 'sed -i "s/git.commit: .*/git.commit: ${GITHUB_SHA}/" clusters/preprod/integration/helmrelease.yaml'
- name: Auto-Commit
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
with:
commit_message: Upgrade integration to main ${{ github.sha }}