-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SONAR-23539 make github action compatible with community build releases
* SONAR-23539 make github action compatible with community build releases * SONAR-23539 address reviewer comment
- Loading branch information
Showing
2 changed files
with
60 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Reusable release job template | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
tag: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
release: | ||
name: Upload Release Asset | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
id-token: write | ||
steps: | ||
- id: secrets | ||
uses: SonarSource/[email protected] | ||
with: | ||
secrets: | | ||
development/kv/data/sign key | gpg_key; | ||
development/kv/data/sign passphrase | gpg_passphrase; | ||
- name: Generate CycloneDX SBOM | ||
uses: SonarSource/gh-action_sbom@v1 | ||
with: | ||
image: "sonarqube:${{ inputs.tag }}" | ||
filename: "sonarqube-${{ inputs.tag }}-bom.json" | ||
upload-artifact: true | ||
upload-release-assets: true | ||
env: | ||
GPG_PRIVATE_KEY_PASSPHRASE: ${{ fromJSON(steps.secrets.outputs.vault).gpg_passphrase }} | ||
GPG_PRIVATE_KEY_BASE64: ${{ fromJSON(steps.secrets.outputs.vault).gpg_key }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,9 @@ on: | |
- created | ||
|
||
jobs: | ||
release: | ||
name: Upload Release Asset | ||
release-9-x: | ||
name: Upload Release Assets for 9-X releases | ||
if: contains(github.event.release.name, '9.') | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -17,29 +18,31 @@ jobs: | |
- 9-enterprise | ||
- 9-datacenter-app | ||
- 9-datacenter-search | ||
- 10-community | ||
uses: ./.github/workflows/release-template.yml | ||
with: | ||
tag: ${{ matrix.tag }} | ||
release-10-x: | ||
name: Upload Release Assets for 10-X releases | ||
if: contains(github.event.release.name, '10.') | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
tag: | ||
- 10-developer | ||
- 10-enterprise | ||
- 10-datacenter-app | ||
- 10-datacenter-search | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
id-token: write | ||
steps: | ||
- id: secrets | ||
uses: SonarSource/[email protected] | ||
with: | ||
secrets: | | ||
development/kv/data/sign key | gpg_key; | ||
development/kv/data/sign passphrase | gpg_passphrase; | ||
- name: Generate CycloneDX SBOM | ||
uses: SonarSource/gh-action_sbom@v1 | ||
with: | ||
image: "sonarqube:${{ matrix.tag }}" | ||
filename: "sonarqube-${{ matrix.tag }}-bom.json" | ||
upload-artifact: true | ||
upload-release-assets: true | ||
env: | ||
GPG_PRIVATE_KEY_PASSPHRASE: ${{ fromJSON(steps.secrets.outputs.vault).gpg_passphrase }} | ||
GPG_PRIVATE_KEY_BASE64: ${{ fromJSON(steps.secrets.outputs.vault).gpg_key }} | ||
uses: ./.github/workflows/release-template.yml | ||
with: | ||
tag: ${{ matrix.tag }} | ||
release-community-build: | ||
name: Upload Release Assets for community-build release | ||
if: contains(github.event.release.name, 'Community Build') | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
tag: | ||
- community | ||
uses: ./.github/workflows/release-template.yml | ||
with: | ||
tag: ${{ matrix.tag }} |