Update build-logic/common digest to f1f78b2 (#628) #73
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - branch-* | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 17 * * *' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| GO_VERSION: "1.25.1" | |
| GOLANG_CI_LINT_VERSION: "2.4.0" | |
| SONAR_PROJECT_KEY: "SonarSource_sonar-iac" | |
| jobs: | |
| build: | |
| runs-on: sonar-s-public | |
| name: Build and Analysis | |
| permissions: | |
| id-token: write # Required for Vault OIDC authentication | |
| contents: write # Required for repository access | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| fetch-depth: 0 | |
| - uses: jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 # v3.3.1 | |
| with: | |
| version: 2025.7.12 | |
| - name: Install golangci-lint | |
| run: | | |
| curl --proto "=https" -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /home/runner/go/bin v${GOLANG_CI_LINT_VERSION} | |
| echo "/opt/go/bin:/opt/protoc/bin:/opt/musl/bin:/home/runner/go/bin" >> $GITHUB_PATH | |
| - name: Checkout build logic | |
| run: | | |
| git submodule update --init --depth 1 -- build-logic/common | |
| - name: Create Gradle User Home | |
| shell: bash | |
| run: | | |
| export GRADLE_USER_HOME=${GITHUB_WORKSPACE}/.gradle | |
| mkdir -p ${GRADLE_USER_HOME} | |
| echo "GRADLE_USER_HOME=${GRADLE_USER_HOME}" >> $GITHUB_ENV | |
| - name: Create Go cache keys | |
| env: | |
| GITHUB_WORKSPACE: ${{ github.workspace }} | |
| run: | | |
| export GOCACHE=$(go env GOCACHE) | |
| echo "GOCACHE=${GOCACHE}" >> $GITHUB_ENV | |
| # NOTE: Find Go source files in sonar-helm-for-iac | |
| export GOCACHE_KEY=$(find ${GITHUB_WORKSPACE}/sonar-helm-for-iac -name '*.go' -o -name 'go.mod' -o -name 'go.sum' 2>/dev/null | \ | |
| xargs cat 2>/dev/null | sha256sum | xargs echo $RUNNER_OS $RUNNER_ARCH | tr -s ' ' '-') | |
| echo "GOCACHE_KEY=${GOCACHE_KEY}" >> $GITHUB_ENV | |
| - name: Build and analyze | |
| uses: SonarSource/ci-github-actions/build-gradle@v1 | |
| env: | |
| GO_CROSS_COMPILE: "1" | |
| with: | |
| public: true | |
| deploy-pull-request: false | |
| skip-tests: false | |
| use-develocity: true | |
| gradle-args: --build-cache -x artifactoryPublish -Dsonar.projectName=SonarIaC | |
| disable-caching: true |