-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated to the latest version of build report where instead of env va…
…riables we pass them as cli arguments
- Loading branch information
Showing
1 changed file
with
21 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,15 +60,26 @@ jobs: | |
echo "coverage = ${{ steps.jacoco.outputs.coverage }}" | ||
echo "branch coverage = ${{ steps.jacoco.outputs.branches }}" | ||
- name: Run Specmatic Insights Github Build Reporter | ||
uses: znsio/[email protected] | ||
- name: Get Workflow Definition ID | ||
id: get_workflow_id | ||
env: | ||
SPECMATIC_ORG_ID: ${{ secrets.SPECMATIC_ORG_ID }} | ||
GITHUB_TOKEN: ${{ secrets.SPECMATIC_INSIGHTS_ACCESS_TOKEN }} | ||
GITHUB_REF: ${{ github.ref }} | ||
GITHUB_REF_NAME: ${{ github.ref_name }} | ||
GITHUB_REPOSITORY: ${{ github.repository }} | ||
GITHUB_RUN_ID: ${{ github.run_id }} | ||
GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }} | ||
GITHUB_REPOSITORY_ID: ${{ github.repository_id }} | ||
GITHUB_SERVER_URL: ${{ github.server_url }} | ||
run: | | ||
api_url="https://api.github.com/repos/${{ github.repository }}/actions/workflows" | ||
workflow_name="${{ github.workflow }}" | ||
response=$(curl -s -H "Authorization: token $GITHUB_TOKEN" $api_url) | ||
workflow_id=$(echo "$response" | jq -r --arg workflow_name "$workflow_name" '.workflows[] | select(.name == $workflow_name) | .id') | ||
echo "Workflow ID: $workflow_id" # Debug print | ||
echo "workflow_id=$workflow_id" >> "$GITHUB_OUTPUT" | ||
- name: Run Specmatic Insights Github Build Reporter | ||
uses: znsio/[email protected] | ||
with: | ||
org-id: ${{ secrets.SPECMATIC_ORG_ID }} | ||
branch-ref: ${{ github.ref }} | ||
branch-name: ${{ github.ref_name }} | ||
build-definition-id: ${{ steps.get_workflow_id.outputs.workflow_id }} | ||
build-id: ${{ github.run_id }} | ||
repo-name: ${{ github.event.repository.name }} | ||
repo-id: ${{ github.repository_id }} | ||
repo-url: ${{ github.event.repository.html_url }} |