-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added driver release action * Release automation Signed-off-by: meghana_gm <[email protected]> * Release automation Signed-off-by: meghana_gm <[email protected]> * fix dispatch type and linting --------- Signed-off-by: meghana_gm <[email protected]> Co-authored-by: meghana_gm <[email protected]> Co-authored-by: root <[email protected]>
- Loading branch information
1 parent
1675c61
commit 5a9ba1b
Showing
3 changed files
with
69 additions
and
1 deletion.
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,46 @@ | ||
name: Auto Release CSM | ||
on: # yamllint disable-line rule:truthy | ||
workflow_dispatch: | ||
repository_dispatch: | ||
types: [auto-release-workflow] | ||
|
||
jobs: | ||
calculate-version: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
new-version: ${{ steps.set-version.outputs.version }} | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Fetch the full history including tags | ||
|
||
- name: Get latest release version | ||
id: get-latest-version | ||
run: | | ||
latest_version=$(git describe --tags $(git rev-list --tags --max-count=1)) | ||
echo "latest_version=${latest_version}" >> $GITHUB_ENV | ||
- name: Increment minor version and remove 'v' prefix | ||
id: set-version | ||
run: | | ||
version=${{ env.latest_version }} | ||
clean_version=${version#v} | ||
# Parse version parts | ||
major=$(echo $clean_version | cut -d'.' -f1) | ||
minor=$(echo $clean_version | cut -d'.' -f2) | ||
patch=$(echo $clean_version | cut -d'.' -f3) | ||
new_minor=$((minor + 1)) | ||
new_version="${major}.${new_minor}.0" | ||
echo "New version: $new_version" | ||
echo "::set-output name=version::$new_version" | ||
csm-release: | ||
needs: calculate-version | ||
uses: dell/common-github-actions/.github/workflows/csm-release-driver-module.yaml@main | ||
with: | ||
version: ${{ inputs.version || needs.calculate-version.outputs.new-version }} | ||
image: "csi-powermax" | ||
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
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,22 @@ | ||
name: Release CSI-Powermax | ||
# Invocable as a reusable workflow | ||
# Can be manually triggered | ||
on: # yamllint disable-line rule:truthy | ||
workflow_call: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version to release (major, minor, patch), Example: 1.x.x' | ||
required: true | ||
image: | ||
description: 'Image name. Example: csi-powermax' | ||
default: 'csi-powermax' | ||
required: true | ||
jobs: | ||
csm-release: | ||
uses: dell/common-github-actions/.github/workflows/csm-release-driver-module.yaml@main | ||
name: Release CSM Drivers and Modules | ||
with: | ||
version: ${{ github.event.inputs.version }} | ||
image: ${{ github.event.inputs.image }} | ||
secrets: inherit |