From ef10050d9386c15c3fccb4d2709e64e6d52c5472 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 4 Nov 2025 16:15:26 +0000 Subject: [PATCH] update actions --- .github/workflows/create-tag-release.yaml | 32 ++++++++++++ .github/workflows/license-checker.yaml | 2 - .github/workflows/release.yaml | 59 ----------------------- 3 files changed, 32 insertions(+), 61 deletions(-) create mode 100644 .github/workflows/create-tag-release.yaml delete mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/create-tag-release.yaml b/.github/workflows/create-tag-release.yaml new file mode 100644 index 0000000..e59b269 --- /dev/null +++ b/.github/workflows/create-tag-release.yaml @@ -0,0 +1,32 @@ +name: Create Tag and Release +# Invocable as a reusable workflow +# Can be manually triggered +on: # yamllint disable-line rule:truthy + workflow_call: + workflow_dispatch: + inputs: + option: + description: "Select type of release. If first release, use major and it will release v1.0.0." + required: true + type: choice + default: "minor" + options: + - major + - minor + - patch + - version + version: + description: "Specific semver version to release. Only used when 'version' is the selected option. Example: v2.1.x." + required: false + type: string + repository_dispatch: + types: [auto-release-workflow] + +jobs: + csm-release: + name: Create Tag and Release + uses: dell/common-github-actions/.github/workflows/create-tag-release.yaml@main + with: + option: ${{ inputs.option || 'minor' }} + version: ${{ inputs.version || '' }} + secrets: inherit diff --git a/.github/workflows/license-checker.yaml b/.github/workflows/license-checker.yaml index ec134b1..02e1cc5 100644 --- a/.github/workflows/license-checker.yaml +++ b/.github/workflows/license-checker.yaml @@ -1,8 +1,6 @@ name: Weekly License Header Check on: - schedule: - - cron: '0 0 * * 1' # Runs every Monday at 00:00 UTC workflow_dispatch: jobs: license-check: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index b003bed..0000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,59 +0,0 @@ -name: Release CSM-Topology -# Invocable as a reusable workflow -# Can be manually triggered -on: # yamllint disable-line rule:truthy - workflow_call: - workflow_dispatch: - inputs: - option: - description: 'Select version to release' - required: true - type: choice - default: 'minor' - options: - - 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 - repository_dispatch: - types: [auto-release-workflow] -jobs: - process-inputs: - name: Process Inputs - runs-on: ubuntu-latest - outputs: - processedVersion: ${{ steps.set-version.outputs.versionEnv }} - steps: - - name: Process input - id: set-version - shell: bash - run: | - echo "Triggered by: ${{ github.event_name }}" - if [[ "${{ github.event_name }}" == "repository_dispatch" ]]; then - echo "versionEnv=minor" >> $GITHUB_OUTPUT - exit 0 - fi - if [[ "${{ github.event.inputs.version }}" != "" && "${{ github.event.inputs.option }}" == "n-1/n-2 patch (Provide input in the below box)" ]]; then - # if both version and option are provided, then version takes precedence i.e. patch release for n-1/n-2 - echo "versionEnv=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT - exit 0 - fi - if [[ "${{ github.event.inputs.option }}" != "n-1/n-2 patch (Provide input in the below box)" ]]; then - # if only option is provided, then option takes precedence i.e. minor, major or patch release - echo "versionEnv=${{ github.event.inputs.option }}" >> $GITHUB_OUTPUT - exit 0 - fi - # if neither option nor version is provided, then minor release is taken by default (Auto-release) - echo "versionEnv=minor" >> $GITHUB_OUTPUT - csm-release: - needs: [process-inputs] - uses: dell/common-github-actions/.github/workflows/csm-release-driver-module.yaml@main - name: Release CSM Drivers and Modules - with: - version: ${{ needs.process-inputs.outputs.processedVersion }} - images: 'csm-topology' - secrets: inherit