Skip to content

Commit

Permalink
move the branch check to script and remove check for sec-scanner-config
Browse files Browse the repository at this point in the history
Move the check, that verifies that the current branch starts with 'version-', to a scipt file.
Remove the check for sec-scanner-config, to make space for a better solution.
  • Loading branch information
friedrichwilken committed Dec 15, 2023
1 parent 26004bd commit 289f470
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 44 deletions.
11 changes: 11 additions & 0 deletions .github/scripts/verify_is_on_release_branch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

# This script verifies, that the current branch name starts with 'release-'

CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [[ "$CURRENT_BRANCH" == release-* ]]; then
echo "Branch name starts with 'release-'."
else
echo "Branch name does not start with 'release-'."
exit 1
fi
14 changes: 2 additions & 12 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,17 @@ jobs:
verify-release:
name: Verify the release branch, tag and version
runs-on: ubuntu-latest

steps:
- name: Check if the desired version is valid
run: .github/scripts/check_version_format.sh

- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Verify that the current branch has a name that starts with 'release-'
run: |
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [[ "$CURRENT_BRANCH" == release-* ]]; then
echo "Branch name starts with 'release-'."
else
echo "Branch name does not start with 'release-'."
exit 1
fi
- name: Check image Tag
run: ./scripts/check_tag_info.sh ${{ github.event.inputs.name }}
run: .github/scripts/verify_is_on_release_branch.sh

create-draft:
name: Create draft release
Expand Down
32 changes: 0 additions & 32 deletions scripts/check_tag_info.sh

This file was deleted.

0 comments on commit 289f470

Please sign in to comment.