Skip to content

Commit

Permalink
Emit non-fatal errors as GHA warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Jan 21, 2024
1 parent 1862ef5 commit fe77201
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,15 @@ runs:
shell: bash
env:
ARTIFACT_PATH: ${{ inputs.artifact-path }}
run: python -m galaxy_importer.main "${ARTIFACT_PATH}"
run: |
python -m galaxy_importer.main "${ARTIFACT_PATH}" | tee import.log
- name: Analyze result
shell: python
run: |
error_prefix = 'ERROR:'
with open('import.log', 'r', encoding='utf-8') as f:
for line in f:
if line.startswith(error_prefix):
msg = line[len(error_prefix):].strip()
print(f"::warning::Galaxy importer emitted the following non-fatal error: {msg}")

0 comments on commit fe77201

Please sign in to comment.