-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Shmuelarditi patch 1 #324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shmuelarditi patch 1 #324
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -8,44 +8,20 @@ | |||||
|
|
||||||
| jobs: | ||||||
| release-dispatch: | ||||||
| if: (github.event_name == 'push') || (github.event_name == 'pull_request' && github.event.pull_request.merged == true && github.base_ref == 'master') | ||||||
| if: github.event_name == 'push' || (github.event.pull_request.merged == true && github.base_ref == 'master') | ||||||
| runs-on: ubuntu-latest | ||||||
| steps: | ||||||
| - name: Determine version level | ||||||
| id: level | ||||||
| run: | | ||||||
| if [[ "${{ github.event_name }}" == "pull_request" ]]; then | ||||||
| # Extract labels from merged PR | ||||||
| LABELS="${{ join(github.event.pull_request.labels.*.name, ',') }}" | ||||||
| echo "PR Labels: $LABELS" | ||||||
|
|
||||||
| if [[ "$LABELS" == *"major"* ]]; then | ||||||
| echo "level=major" >> $GITHUB_OUTPUT | ||||||
| echo "Using PR label: major" | ||||||
| elif [[ "$LABELS" == *"minor"* ]]; then | ||||||
| echo "level=minor" >> $GITHUB_OUTPUT | ||||||
| echo "Using PR label: minor" | ||||||
| else | ||||||
| echo "level=patch" >> $GITHUB_OUTPUT | ||||||
| echo "Using PR label default: patch" | ||||||
| fi | ||||||
| else | ||||||
| # Push to master - default to patch | ||||||
| echo "level=patch" >> $GITHUB_OUTPUT | ||||||
| echo "Using push default: patch" | ||||||
| fi | ||||||
|
|
||||||
| - name: Send dispatch | ||||||
| uses: peter-evans/repository-dispatch@v3 | ||||||
| with: | ||||||
| token: ${{ secrets.CLOUD_DEVOPS_TOKEN }} | ||||||
| repository: ${{ secrets.dispatch_repo }} | ||||||
| event-type: release | ||||||
| client-payload: | | ||||||
| { | ||||||
| "level": "${{ steps.level.outputs.level }}", | ||||||
| "level": "patch", | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🐞 Bug - Semantic Versioning Lost: Restore the dynamic version level determination logic or implement an alternative mechanism to specify release levels based on PR labels or other criteria.
Suggested change
|
||||||
| "source": "${{ github.event_name }}", | ||||||
| "ref": "${{ github.ref }}", | ||||||
| "sha": "${{ github.sha }}", | ||||||
| "actor": "${{ github.actor }}" | ||||||
| } | ||||||
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐞 Bug - Condition Logic Change: Keep the explicit event type check in the condition:
github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true && github.base_ref == 'master')