Skip to content

Commit

Permalink
Merge branch 'main' into feat/issues/6755
Browse files Browse the repository at this point in the history
  • Loading branch information
shivanshuraj1333 authored Jan 6, 2025
2 parents 6f9271f + 15f85a6 commit 123996d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/prereleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,18 @@ on:
- 'major'

jobs:
verify:
uses: signoz/primus.workflows/.github/workflows/github-verify.yaml@main
secrets: inherit
with:
PRIMUS_REF: main
GITHUB_TEAM_NAME: releaser
GITHUB_MEMBER_NAME: ${{ github.actor }}
signoz:
if: ${{ always() && (needs.verify.result == 'success' || github.event.name == 'schedule') }}
uses: signoz/primus.workflows/.github/workflows/releaser.yaml@main
secrets: inherit
needs: [verify]
with:
PRIMUS_REF: main
PROJECT_NAME: signoz
Expand Down
37 changes: 15 additions & 22 deletions .github/workflows/releaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,27 @@ on:
types: [published]

jobs:
charts:
detect:
runs-on: ubuntu-latest
outputs:
release_type: ${{ steps.find.outputs.release_type }}
steps:
- id: token
name: github-token-gen
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.PRIMUS_APP_ID }}
private-key: ${{ secrets.PRIMUS_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: trigger-charts-prereleaser
- id: find
name: find
run: |
# Variables
repo_owner="signoz"
repo_name="charts"
event_type="prereleaser"
# identify the release type
release_tag=${{ github.event.release.tag_name }}
patch_number=$(echo $release_tag | awk -F. '{print $3}')
release_type="minor"
if [[ $patch_number -ne 0 ]]; then
release_type="patch"
fi
# trigger the releaser workflow in signoz/charts repo
curl -L -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer ${{ steps.token.outputs.token }}" \
"https://api.github.com/repos/${repo_owner}/${repo_name}/dispatches" \
-d "{\"event_type\": \"$event_type\", \"client_payload\": {\"release_type\": \"$release_type\"}}"
echo "release_type=${release_type}" >> "$GITHUB_OUTPUT"
charts:
uses: signoz/primus.workflows/.github/workflows/github-trigger.yaml@main
secrets: inherit
needs: [detect]
with:
PRIMUS_REF: main
GITHUB_REPOSITORY_NAME: charts
GITHUB_EVENT_NAME: prereleaser
GITHUB_EVENT_PAYLOAD: "{\"release_type\": \"${{ needs.detect.outputs.release_type }}\"}"

0 comments on commit 123996d

Please sign in to comment.