-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Cherry pick fixes for update of default branch to main (#17200) (
#17235) Signed-off-by: Roger Barker <roger.barker@swirldslabs.com> Signed-off-by: Jendrik Johannes <jendrik.johannes@gmail.com> Co-authored-by: Jendrik Johannes <jendrik.johannes@gmail.com> Co-authored-by: Andrew Brandt <andrew.brandt@hashgraph.com> Co-authored-by: Thomas Moran <152873392+thomas-swirlds-labs@users.noreply.github.com>
- Loading branch information
1 parent
67e04a4
commit 4a09f7d
Showing
27 changed files
with
325 additions
and
220 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
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
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,72 @@ | ||
## | ||
# Copyright (C) 2023-2025 Hedera Hashgraph, LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
## | ||
|
||
name: "ZXF: Collect Workflow Run Logs" | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
workflow_id: | ||
description: "ID of the workflow run to collect logs from (example: #123456789)" | ||
required: true | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
collect-logs: | ||
name: Collect Workflow Run Logs | ||
runs-on: network-node-linux-medium | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | ||
with: | ||
egress-policy: audit | ||
|
||
- name: Get run ID from run number | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | ||
id: run_id | ||
run: | | ||
RUN_ID=$(gh api -H "Accept: application/vnd.github+json" \ | ||
/repos/hashgraph/hedera-services/actions/workflows/zxcron-extended-test-suite.yaml/runs \ | ||
--jq '.workflow_runs[] | select(.run_number == ${{ inputs.workflow_id }}) | .id') | ||
echo "::set-output name=value::$RUN_ID" | ||
- name: Checkout Code | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: '0' | ||
ref: main | ||
token: ${{ secrets.GH_ACCESS_TOKEN }} | ||
|
||
- name: Get run logs | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | ||
run: gh run view ${{ steps.run_id.outputs.value }} --log >> workflow-run.log | ||
|
||
- name: Upload log as artifact | ||
id: upload-log | ||
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 | ||
with: | ||
path: workflow-run.log | ||
|
||
- name: Share log information | ||
run: | | ||
echo "### Logs Collected for Workflow:" >> $GITHUB_STEP_SUMMARY | ||
echo "Workflow run ID: ${{ inputs.workflow_id }}" >> $GITHUB_STEP_SUMMARY | ||
echo "Workflow URL: https://github.com/hashgraph/hedera-services/actions/runs/${{ steps.run_id.outputs.value }}" >> $GITHUB_STEP_SUMMARY | ||
echo "Log file download URL: ${{ steps.upload-log.outputs.artifact-url }}" >> $GITHUB_STEP_SUMMARY |
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
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
Oops, something went wrong.