Skip to content

Commit d640fcd

Browse files
authored
Merge pull request #75 from endlessm/wjt/push-zmqoruwpwqwr
Add link to workflow run in footer
2 parents 9495fb1 + b25aaf0 commit d640fcd

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ runs:
3434
GITHUB_REPOSITORY: ${{ github.repository }}
3535
WORKFLOW_NAME: ${{ inputs.workflow_name }}
3636
ARTIFACT_NAME: ${{ inputs.artifact_name }}
37+
WORKFLOW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
3738

3839
- name: Upload pages artifact
3940
uses: actions/upload-pages-artifact@v4

branches.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,15 @@ <h1>Playable branches from <a href="{{ repo_details.html_url}}">{{ repo_details.
8484
</main>
8585
<footer>
8686
Created with <a href="https://github.com/endlessm/amalgamate-pages">Amalgamate Pages</a> at
87-
<time datetime="{{ generation_time.isoformat() }}">{{
88-
generation_time | pretty_datetime
89-
}}</time>.
87+
{% if workflow_run_url %}
88+
<a href="{{ workflow_run_url }}">
89+
{%- endif -%}
90+
<time datetime="{{ generation_time.isoformat() }}">{{
91+
generation_time | pretty_datetime
92+
}}</time>
93+
{%- if workflow_run_url -%}
94+
</a>
95+
{%- endif %}.
9096
</footer>
9197
</body>
9298
</html>

godoctopus.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,7 @@ def run(self) -> None:
475475
"latest_release": latest_release,
476476
"branches": items,
477477
"generation_time": dt.datetime.now(tz=dt.timezone.utc),
478+
"workflow_run_url": os.environ.get("WORKFLOW_RUN_URL"),
478479
},
479480
)
480481
shutil.copy("branches.css", branches_dir / "branches.css")

0 commit comments

Comments
 (0)