Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce stable image name with variable query #26

Merged
merged 2 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ runs:
org=${{ github.repository_owner }}
repo=$(cut -f2 -d/ <<<${{ github.repository }})
[ "${{ github.event_name }}" == pull_request ] && extra="/pr-preview/pr-${{ github.event.number }}"
preview="preview_$(date +%s).png"
preview_date="$(date +%s)"
preview="preview.png"
echo "PREVIEW_NAME=$preview" >> "$GITHUB_ENV"
echo "PREVIEW_URL=https://$org.github.io/$repo$extra/$preview" >> "$GITHUB_ENV"
echo "PREVIEW_URL=https://$org.github.io/$repo$extra/$preview?v=$preview_date" >> "$GITHUB_ENV"
if [ "${{ env.BACKLOG_STATUS }}" -eq 0 ]; then
color="#55cc33"
else
Expand Down
2 changes: 1 addition & 1 deletion foot.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<hr>
<a href="https://github.com/GITHUB_REPOSITORY">GITHUB_REPOSITORY on GitHub</a>
</body></html>
</main></body></html>
4 changes: 3 additions & 1 deletion head.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
<meta property="og:url" content="https://github.com/GITHUB_REPOSITORY" />
<meta property="og:image" content="PREVIEW_IMAGE_URL" />
<style>
body {
main {
font-family: Verdana, Arial;
border-top: 5px solid STATUS_COLOR;
margin: 0px 5px 5px 5px;
background-color: white;
}
table {
border: 1px solid #a8a8a8;
Expand All @@ -29,3 +30,4 @@
</style>
</head>
<body>
<main>
Loading