-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/518-policy-store-api-test-step-definitions
- Loading branch information
Showing
149 changed files
with
65,399 additions
and
72,493 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
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,67 +1,64 @@ | ||
name: Release IRS | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+' | ||
workflow_call: | ||
inputs: | ||
new-irs-version: | ||
description: 'New IRS version' | ||
required: true | ||
type: string | ||
previous-irs-version: | ||
description: 'Previous IRS version' | ||
required: true | ||
type: string | ||
helm-chart-version: | ||
description: 'New Helm Chart version' | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Calculate Helm release version from CHANGELOG | ||
run: echo HELM_VERSION=$(cat charts/item-relationship-service/CHANGELOG.md | sed -n 's/.*\[\([0-9]\+\.[0-9]\+\.[0-9]\+\)\].*/\1/p' | head -n 1) >> $GITHUB_ENV | ||
|
||
- name: Update Chart.yaml appVersion | ||
uses: mikefarah/[email protected] | ||
with: | ||
cmd: yq -i eval '.appVersion = "${{ github.ref_name }}"' charts/item-relationship-service/Chart.yaml | ||
cmd: yq -i eval '.appVersion = "${{ inputs.new-irs-version }}"' charts/item-relationship-service/Chart.yaml | ||
|
||
- name: Update Chart.yaml version | ||
uses: mikefarah/[email protected] | ||
with: | ||
cmd: yq -i eval '.version = "${{ env.HELM_VERSION }}"' charts/item-relationship-service/Chart.yaml | ||
cmd: yq -i eval '.version = "${{ inputs.helm-chart-version }}"' charts/item-relationship-service/Chart.yaml | ||
|
||
- name: Prepare Helm release | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
commit-message: "chore(release): Prepare release for Helm version ${{ env.HELM_VERSION }}" | ||
branch: chore/prepare-helm-release-${{ env.HELM_VERSION }} | ||
commit-message: "chore(release): Prepare release for Helm version ${{ inputs.helm-chart-version }}" | ||
branch: chore/prepare-helm-release-${{ inputs.helm-chart-version }} | ||
base: main | ||
delete-branch: true | ||
title: Prepare Helm release for next version | ||
body: | | ||
This PR prepares the Helm chart release for version ${{ env.HELM_VERSION }}. | ||
This PR prepares the Helm chart release for version ${{ inputs.helm-chart-version }}. | ||
Please check whether the Chart was updated correctly and that the CHANGELOG contains the relevant information | ||
for this release. Also, make sure that the values.yaml is correct before merging this PR. | ||
- name: Get previous version | ||
run: echo PREVIOUS_VERSION=$(git tag | grep -E ^[0-9]+\\.[0-9]+\\.[0-9]+ | tail -2 | head -n +1) >> $GITHUB_ENV | ||
|
||
- name: Extract changelog text | ||
# See: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings | ||
run: | | ||
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) | ||
echo "CHANGELOG<<$EOF" >> $GITHUB_ENV | ||
sed -n -e '/## \[${{ github.ref_name }}\]/,/## \[/ p' CHANGELOG.md | head -n -1 | tail -n +2 >> $GITHUB_ENV | ||
echo **Full Changelog**: ${{ github.server_url }}/${{ github.repository }}/compare/${{ env.PREVIOUS_VERSION }}...${{ github.ref_name }} >> $GITHUB_ENV | ||
sed -n -e '/## \[${{ inputs.new-irs-version }}\]/,/## \[/ p' CHANGELOG.md | head -n -1 | tail -n +2 >> $GITHUB_ENV | ||
echo **Full Changelog**: ${{ github.server_url }}/${{ github.repository }}/compare/${{ inputs.previous-irs-version }}...${{ inputs.new-irs-version }} >> $GITHUB_ENV | ||
echo "$EOF" >> "$GITHUB_ENV" | ||
- name: Create IRS release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
body: ${{ env.CHANGELOG }} | ||
|
||
trigger-jira: | ||
needs: | ||
- release | ||
uses: ./.github/workflows/jira-publish-release.yaml | ||
with: | ||
version: ${{ github.ref_name }} | ||
secrets: inherit | ||
tag_name: ${{ inputs.new-irs-version }} | ||
|
||
publish-to-swaggerhub: | ||
name: "Publish OpenAPI spec to Swaggerhub" | ||
|
@@ -71,5 +68,5 @@ jobs: | |
- release | ||
uses: ./.github/workflows/publish-swagger-hub.yml | ||
with: | ||
version: ${{ github.ref_name }} | ||
version: ${{ inputs.new-irs-version }} | ||
secrets: inherit |
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
Oops, something went wrong.