Skip to content

Commit 561ea8a

Browse files
committed
Simplify JOSS render workflow
1 parent be3e6e0 commit 561ea8a

2 files changed

Lines changed: 12 additions & 66 deletions

File tree

.github/workflows/render_joss_paper.yml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ jobs:
3131
runs-on: ubuntu-latest
3232
# The timeout minutes for the job to complete
3333
timeout-minutes: 5
34+
# We trust the deploy action with write permissions
35+
permissions:
36+
id-token: write
3437

3538
steps:
3639
# Checkout your repository under $GITHUB_WORKSPACE so your job can access it
@@ -46,27 +49,9 @@ jobs:
4649
journal: joss
4750
paper-path: paper/paper.md
4851

49-
50-
51-
# Upload the rendered PDF to GitHub
52-
upload-draft:
53-
# The type of runner that the job will run on
54-
runs-on: ubuntu-latest
55-
# The timeout minutes for the job to complete
56-
timeout-minutes: 5
57-
58-
# The draft need to have been built first
59-
needs: [build-draft]
60-
61-
# We trust the deploy action with write permissions
62-
permissions:
63-
id-token: write
64-
steps:
65-
52+
# Upload the paper build
6653
- name: Upload draft PDF
6754
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v4
6855
with:
6956
name: paper
7057
path: paper/paper.pdf
71-
72-

template/.github/workflows/render_joss_paper.yml.jinja

Lines changed: 8 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ jobs:
3131
runs-on: ubuntu-latest
3232
# The timeout minutes for the job to complete
3333
timeout-minutes: {{ joss_render_timeout }}
34+
# We trust the deploy action with write permissions
35+
permissions:
36+
id-token: write
3437

3538
steps:
3639
# Checkout your repository under $GITHUB_WORKSPACE so your job can access it
@@ -56,59 +59,17 @@ jobs:
5659
journal: joss
5760
paper-path: paper/paper.md
5861

59-
{% if carbon_aware %}
60-
{%- raw -%}
61-
# Measure energy consumption of the draft build
62-
- name: Draft build measurement
63-
uses: green-coding-solutions/eco-ci-energy-estimation@862050e4f01f65b1436e5eca18ba4bd85562f0de # v5.0.0
64-
with:
65-
task: get-measurement
66-
label: 'pytest'
67-
continue-on-error: true
68-
69-
- name: Show Energy Results
70-
uses: green-coding-solutions/eco-ci-energy-estimation@862050e4f01f65b1436e5eca18ba4bd85562f0de # v5.0.0
71-
with:
72-
task: display-results
73-
continue-on-error: true
74-
{%- endraw -%}
75-
{% endif %}
76-
77-
# Upload the rendered PDF to GitHub
78-
upload-draft:
79-
# The type of runner that the job will run on
80-
runs-on: ubuntu-latest
81-
# The timeout minutes for the job to complete
82-
timeout-minutes: {{ joss_upload_timeout }}
83-
84-
# The draft need to have been built first
85-
needs: [build-draft]
86-
87-
# We trust the deploy action with write permissions
88-
permissions:
89-
id-token: write
90-
steps:
91-
92-
{%- if carbon_aware -%}
93-
{% raw %}
94-
- name: Start Measurement
95-
uses: green-coding-solutions/eco-ci-energy-estimation@862050e4f01f65b1436e5eca18ba4bd85562f0de # v5.0.0
96-
with:
97-
task: start-measurement
98-
continue-on-error: true
99-
{%- endraw -%}
100-
{% endif %}
101-
62+
# Upload the paper build
10263
- name: Upload draft PDF
10364
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v4
10465
with:
10566
name: paper
10667
path: paper/paper.pdf
10768

108-
{% if carbon_aware %}
69+
{%- if carbon_aware -%}
10970
{%- raw -%}
110-
# Measure energy consumption of the upload
111-
- name: Upload measurement
71+
# Measure energy consumption of the draft build
72+
- name: Draft build measurement
11273
uses: green-coding-solutions/eco-ci-energy-estimation@862050e4f01f65b1436e5eca18ba4bd85562f0de # v5.0.0
11374
with:
11475
task: get-measurement
@@ -121,4 +82,4 @@ jobs:
12182
task: display-results
12283
continue-on-error: true
12384
{%- endraw -%}
124-
{%- endif -%}
85+
{% endif %}

0 commit comments

Comments
 (0)