Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/configs/.licenserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
header:
license:
spdx-id: Apache-2.0
copyright-owner: Dell Technologies
content:
/*
*
* Copyright © 2021-2025 Dell Inc. or its subsidiaries. All Rights Reserved.
Comment thread
harishp8889 marked this conversation as resolved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
pattern:
/*
*
* Copyright © 2021-2025 Dell Inc. or its subsidiaries. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
paths-ignore:
- 'dist'
- 'licenses'
- '**/*.md'
- 'LICENSE'
- 'NOTICE'
- '.github'
- '.gitignore'
- 'go.mod'
- 'go.sum'
- '.licenserc.yaml'
- '.git'
comment: on-failure
dependency:
files:
- go.mod # If this is a Go project.
54 changes: 54 additions & 0 deletions .github/workflows/check-license-header.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Copyright (c) 2025 Dell Inc., or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0

# This workflow is used to check for license header in the source code.
name: Check License Header
Comment thread
harishp8889 marked this conversation as resolved.

on:
workflow_call:
jobs:
check-license-header:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get config
run: |
curl -L -o .licenserc.yaml https://raw.githubusercontent.com/dell/common-github-actions/refs/heads/feature/license-validation/.github/configs/.licenserc.yaml

- name: Check License Header
uses: apache/skywalking-eyes/header@main
with:
config: .licenserc.yaml
mode: check

fix-license-headers:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Get config
run: |
curl -L -o .licenserc.yaml https://raw.githubusercontent.com/dell/common-github-actions/refs/heads/feature/license-validation/.github/configs/.licenserc.yaml

- name: Fix License Header
uses: apache/skywalking-eyes/header@main
with:
config: .licenserc.yaml
mode: fix
- name: Cleanup
run: |
rm -rf .licenserc.yaml

- name: Commit changes
uses: EndBug/add-and-commit@v4
with:
author_name: License Bot
author_email: license_bot@github.com
message: "Automatic application of license header"
18 changes: 10 additions & 8 deletions .github/workflows/csm-release-driver-module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
go-version: "1.24"
- name: Install dependencies
run: go mod tidy
- name: Build binaries
- name: Build binaries
run: |
echo "Building binaries to attach to the release if any..."
if "${{ inputs.images == 'cert-csi' }}"; then
Expand Down Expand Up @@ -69,7 +69,9 @@ jobs:
version: ${{ inputs.version }}
secrets: inherit

# we will not going to push images to dockerhub and quay for the patch release as we do not have the image to be retagged, The developers has to build and push it manually to the repository
push-images:
if: ${{ inputs.version == 'patch' || inputs.version == 'minor' || inputs.version == 'major' }}
Comment thread
shaynafinocchiaro marked this conversation as resolved.
name: Release images to Dockerhub and Quay
needs: release-and-tag
runs-on: ubuntu-latest
Expand All @@ -88,7 +90,7 @@ jobs:
echo "Current latest version of $image:$latest_version"

IFS='.' read -r -a version_parts <<< "$latest_version"

if "${{ inputs.version == 'major' }}"; then
# major version bump up
version_parts[0]=$(expr ${version_parts[0]} + 1)
Expand All @@ -104,7 +106,7 @@ jobs:
version_parts[2]=$(expr ${version_parts[2]} + 1)
new_version="${version_parts[0]}.${version_parts[1]}.${version_parts[2]}"
fi

echo "Pushing image: $image:$new_version"
docker pull dellemc/$image:nightly
docker tag dellemc/$image:nightly dellemc/$image:$new_version
Expand All @@ -118,16 +120,16 @@ jobs:
run: |
# Push each comma seperated images by splitting the string with ','
images_list=$(echo '${{ inputs.images }}' | tr -d '[]"' | tr ',' ' ')

REPOSITORY="dell/container-storage-modules"

for image in $images_list; do

latest_version=$(curl -s https://quay.io/api/v1/repository/$REPOSITORY/$image/tag/?limit=100 | jq -r '.tags[].name' | sort -V | tail -n 1)
echo "Current latest version of $image:$latest_version"

IFS='.' read -r -a version_parts <<< "$latest_version"

if "${{ inputs.version == 'major' }}"; then
# major version bump up
version_parts[0]=$(expr ${version_parts[0]} + 1)
Expand All @@ -143,7 +145,7 @@ jobs:
version_parts[2]=$(expr ${version_parts[2]} + 1)
new_version="${version_parts[0]}.${version_parts[1]}.${version_parts[2]}"
fi

# Get manifest digest
SHA=$(curl -s --location --request GET https://quay.io/api/v1/repository/$REPOSITORY/$image/tag?specificTag=nightly --header 'Content-Type: application/json' --header 'Authorization: Bearer ${{ secrets.QUAY_API_TOKEN }}' | jq -r '.tags[0].manifest_digest')
echo "Pushing image: $image:$new_version"
Expand All @@ -155,7 +157,7 @@ jobs:
--data-raw '{
"manifest_digest": "'"$SHA"'"
}'

curl --location --request PUT https://quay.io/api/v1/repository/$REPOSITORY/$image/tag/latest \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ${{ secrets.QUAY_API_TOKEN }}' \
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/release-creator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
workflow_call:
inputs:
version:
description: 'Semantic version to release. Ex: major, minor, or patch'
description: "Semantic version to release. Ex: major, minor, or patch"
required: true
type: string
jobs:
Expand All @@ -28,13 +28,22 @@ jobs:
fetch-depth: 0 # Fetch the full history including tags
ref: ${{ github.ref }} # Checkout the branch from which the workflow is triggered

# we will set the release version based on the user given input for older patch releases only ex: n-1, n-2
Comment thread
harishp8889 marked this conversation as resolved.
- name: Set release version
if: ${{ inputs.version != 'patch' || inputs.version != 'minor' || inputs.version != 'major' }}
run: |
echo "REL_VERSION=v${{ inputs.version }}" >> $GITHUB_ENV

# we will auto bump up the version if it is only patch, minor, or major else we will just use the user given input
- name: Get latest release
if: ${{ inputs.version == 'patch' || inputs.version == 'minor' || inputs.version == 'major' }}
run: |
latest_version=$(git describe --tags $(git rev-list --tags --max-count=1))
latest_version=$(curl -s https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/latest | jq -r .tag_name)
echo "MY_VAR=${latest_version}" >> $GITHUB_ENV
echo "latest_version=${latest_version}"

- name: Increment version
if: ${{ inputs.version == 'patch' || inputs.version == 'minor' || inputs.version == 'major' }}
env:
MY_VAR: ${{ env.MY_VAR }}
run: |
Expand Down
8 changes: 0 additions & 8 deletions .idea/.gitignore

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/common-github-actions.iml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ jobs:
common:
name: Quality Checks
uses: dell/common-github-actions/.github/workflows/go-common.yml@main
check-license-header:
name: Check License Header
uses: dell/common-github-actions/.github/workflows/check-license-header.yaml@main
```

### csm-release-driver-module
Expand All @@ -162,7 +165,11 @@ on: # yamllint disable-line rule:truthy
- major
- minor
- patch

- n-1/n-2 patch (Provide input in the below box)
version:
description: "Patch version to release. example: 2.1.x (Use this only if n-1/n-2 patch is selected)"
required: false
type: string
jobs:
csm-release:
uses: dell/common-github-actions/.github/workflows/csm-release-driver-module.yaml@main
Expand Down