Skip to content

Commit

Permalink
underscore
Browse files Browse the repository at this point in the history
Signed-off-by: Andre Kurait <[email protected]>
  • Loading branch information
AndreKurait committed Nov 15, 2024
1 parent 232d5bb commit dc7fe94
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ jobs:
steps:
- name: Create JSON Artifact
run: |
echo '{' > workflow-info.json
echo ' "pr_number": "${{ github.event.pull_request.number }}",' >> workflow-info.json
echo ' "commit": "${{ github.event.pull_request.head.sha || github.event.after || github.sha }}",' >> workflow-info.json
echo ' "branch": "${{ github.ref }}",' >> workflow-info.json
echo ' "commit_parent": "${{ github.event.pull_request.base.sha || github.event.before || github.base.sha }}",' >> workflow-info.json
echo ' "build_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",' >> workflow-info.json
echo ' "build": "${{ github.run_id }}"' >> workflow-info.json
echo '}' >> workflow-info.json
echo "workflow-info.json created"
echo '{' > workflow_info.json
echo ' "pr_number": "${{ github.event.pull_request.number }}",' >> workflow_info.json
echo ' "commit": "${{ github.event.pull_request.head.sha || github.event.after || github.sha }}",' >> workflow_info.json
echo ' "branch": "${{ github.ref }}",' >> workflow_info.json
echo ' "commit_parent": "${{ github.event.pull_request.base.sha || github.event.before || github.base.sha }}",' >> workflow_info.json
echo ' "build_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",' >> workflow_info.json
echo ' "build": "${{ github.run_id }}"' >> workflow_info.json
echo '}' >> workflow_info.json
echo "workflow_info.json created"
- name: Upload JSON Artifact
uses: actions/upload-artifact@v4
with:
name: workflow-info
path: workflow-info.json
name: workflow_info
path: workflow_info.json


style-check:
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/codecov-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ jobs:
- name: Download Workflow Info
uses: actions/download-artifact@v4
with:
name: workflow-info
name: workflow_info
run-id: ${{ github.event.workflow_run.id }}
- name: Set Environment Variables from JSON
run: |
ls
# Read the JSON file and export each key-value pair as an environment variable
for key in $(jq -r 'keys[]' ./workflow-info.json); do
value=$(jq -r --arg key "$key" '.[$key]' ./workflow-info.json)
echo "workflow-info_$key=$value"
echo "workflow-info_$key=$value" >> $GITHUB_ENV
for key in $(jq -r 'keys[]' ./workflow_info.json); do
value=$(jq -r --arg key "$key" '.[$key]' ./workflow_info.json)
echo "workflow_info_$key=$value"
echo "workflow_info_$key=$value" >> $GITHUB_ENV
done
- name: Download Coverage Artifacts
uses: actions/download-artifact@v4
Expand All @@ -44,11 +44,11 @@ jobs:
fail_ci_if_error: true
files: /**/coverage-reports/**/*.*
flags: unittests
override_branch: ${{ env.workflow-info_branch }}
override_commit: ${{ env.workflow-info_commit }}
override_pr: ${{ env.workflow-info_pr_number }}
commit_parent: ${{ env.workflow-info_commit_parent }}
override_build_url: ${{ env.workflow-info_build_url }}
override_build: ${{ env.workflow-info_build }}
override_branch: ${{ env.workflow_info_branch }}
override_commit: ${{ env.workflow_info_commit }}
override_pr: ${{ env.workflow_info_pr_number }}
commit_parent: ${{ env.workflow_info_commit_parent }}
override_build_url: ${{ env.workflow_info_build_url }}
override_build: ${{ env.workflow_info_build }}
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true

0 comments on commit dc7fe94

Please sign in to comment.