-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (61 loc) · 2.57 KB
/
hermes_github.yml
File metadata and controls
77 lines (61 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# SPDX-FileCopyrightText: 2023 German Aerospace Center (DLR), Forschungszentrum Jülich, Helmholtz-Zentrum Dresden-Rossendorf
#
# SPDX-License-Identifier: CC0-1.0
name: Software Publication
on:
# This trigger on branches being pushed starts the HERMES pipeline.
push:
branches:
- main
# This trigger on closed pull requests is mandatory for the rest of the HERMES workflow.
pull_request:
types:
- closed
jobs:
hermes-prepare:
name: Prepare Metadata for Curation
runs-on: ubuntu-latest
# Only run on push events
if: github.event_name == 'push'
permissions:
contents: read
issues: write # Allow creating new issues with the reports from Software CaRD
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.12'
# For now, skip using hermes - we're just testing CI here
#- run: pip install hermes
#- run: pip install git+https://github.com/softwarepub/hermes-plugin-git
#- run: hermes harvest
#- run: hermes process
# This is where we will run the Software CaRD plugin (later)
# - run: hermes curate
# Create a stub report
- run: |
mkdir -p .hermes/curate
echo '{"test": "foobar"}' > ./.hermes/curate/report
# Upload artifact (there are no real file attachments for issues and the max length may impose problems later, so we can't just use a <details> tag)
- id: upload-report
uses: actions/upload-artifact@v6
with:
name: softwarecard-report
path: ./.hermes/curate/*
if-no-files-found: 'error'
retention-days: 90
- run: 'echo Report artifact accessible at ${{ steps.upload-report.outputs.artifact-url }}'
- run: |
echo 'This is a stub message for Software CaRD report.' | tee -a ./report.md
echo 'Report artifact at ${{ steps.upload-report.outputs.artifact-url }}' | tee -a ./report.md
echo 'Rendered view at https://softwarepub.github.io/software-card/index.html?type=github&repoUrl=${{ github.repositoryUrl }}&artifactUrl=${{ steps.upload-report.outputs.artifact-url }}' | tee -a ./report.md
# Now create an issue and add the Software CaRD report
- name: Create Issue From File
uses: peter-evans/create-issue-from-file@v6
with:
title: An example issue
content-filepath: ./report.md
#labels: |
# report
# automated issue
- run: 'echo Created report in issue #${{ steps.create-report-issue.outputs.issue-number }}'