Skip to content

Commit 82281f9

Browse files
authored
Merge branch 'master' into Upload-Asteria
2 parents ebe3f17 + 5f39421 commit 82281f9

29 files changed

+676
-30
lines changed
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: Publish PR Screenshot
2+
3+
on:
4+
workflow_run:
5+
workflows:
6+
- ".github/workflows/test.yml"
7+
types: [completed]
8+
9+
jobs:
10+
publish:
11+
if: >
12+
github.event.workflow_run.conclusion == 'success' &&
13+
github.event.workflow_run.event == 'pull_request' &&
14+
github.repository == 'AppImage/appimage.github.io'
15+
runs-on: ubuntu-latest
16+
permissions:
17+
actions: read
18+
contents: write
19+
pull-requests: write
20+
env:
21+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v3
26+
27+
- name: Extract PR number from event
28+
id: extract-pr
29+
shell: bash
30+
run: |
31+
PR_NUMBER=$(jq -r '.workflow_run.pull_requests[0].number // empty' "$GITHUB_EVENT_PATH")
32+
echo "PR_NUMBER=${PR_NUMBER}" >> $GITHUB_ENV
33+
echo "PR_NUMBER=${PR_NUMBER}"
34+
echo "pr_number=${PR_NUMBER}" >> $GITHUB_OUTPUT
35+
- name: Download screenshot artifacts
36+
uses: dawidd6/action-download-artifact@v2
37+
with:
38+
run_id: ${{ github.event.workflow_run.id }}
39+
name: pr-screenshots
40+
path: ./out
41+
if_no_artifact_found: ignore
42+
43+
- name: Prepare files
44+
id: prep
45+
shell: bash
46+
run: |
47+
set -e
48+
mkdir -p upload
49+
: > upload/list.txt
50+
SHORT="${HEAD_SHA::8}"
51+
COUNT=0
52+
FALLBACK="run-${{ github.event.workflow_run.id }}"
53+
for f in out/*.png; do
54+
[ -f "$f" ] || continue
55+
base="$(basename "$f")"
56+
appname="${base%.png}" # Remove .png extension to get app name
57+
# Produce deterministic upload name with app name
58+
PN="${PR_NUMBER:-$FALLBACK}"
59+
name="pr-${PN}-${SHORT}-${appname}.png"
60+
cp "$f" "upload/${name}"
61+
echo "${name}" >> upload/list.txt
62+
COUNT=$((COUNT+1))
63+
done
64+
echo "COUNT=${COUNT}" >> $GITHUB_ENV
65+
echo "count=${COUNT}" >> $GITHUB_OUTPUT
66+
67+
- name: Ensure release exists (published)
68+
shell: bash
69+
run: |
70+
gh release view ci-screenshots >/dev/null 2>&1 || \
71+
gh release create ci-screenshots -t "CI Screenshots" -n "Automated screenshots from PRs" --prerelease
72+
gh release edit ci-screenshots --draft=false
73+
74+
- name: Upload assets
75+
if: ${{ steps.prep.outputs.count != '0' }}
76+
shell: bash
77+
run: |
78+
while IFS= read -r name; do
79+
gh release upload ci-screenshots "upload/${name}" --clobber
80+
done < upload/list.txt
81+
82+
- name: Comment on PR with images
83+
if: ${{ steps.prep.outputs.count != '0' && steps.extract-pr.outputs.pr_number != '' }}
84+
shell: bash
85+
run: |
86+
repo="${{ github.repository }}"
87+
{
88+
echo "Automated screenshot(s) for PR #${PR_NUMBER} (commit ${HEAD_SHA}):"
89+
echo ""
90+
while IFS= read -r name; do
91+
url="https://github.com/${repo}/releases/download/ci-screenshots/${name}"
92+
echo "![Screenshot](${url})"
93+
echo ""
94+
done < upload/list.txt
95+
} > comment.txt
96+
gh api "repos/${repo}/issues/${PR_NUMBER}/comments" -F [email protected]
97+

.github/workflows/test.yml

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Test
2+
13
on:
24
push:
35
branches:
@@ -19,6 +21,7 @@ jobs:
1921
runs-on: ubuntu-22.04
2022
timeout-minutes: 10
2123
permissions:
24+
actions: write
2225
contents: write
2326
pull-requests: write
2427
steps:
@@ -46,6 +49,10 @@ jobs:
4649
sudo gem install dupervisor -v 1.0.5 # To convert ini to yaml files
4750
sudo npm install -g asar # to get pacakges.json from resources/app.asar for electron-builder applications
4851
# npm install -g @alexlafroscia/yaml-merge # to merge yaml files
52+
- name: Mark screenshot start (PR only)
53+
if: github.event_name == 'pull_request'
54+
run: |
55+
touch .screenshots_start
4956
- name: Main test
5057
# shell: bash
5158
run: |
@@ -83,6 +90,28 @@ jobs:
8390
# xpra stop :99
8491
killall Xvfb
8592
# bundle exec jekyll build # https://help.github.com/en/articles/viewing-jekyll-build-error-messages#configuring-a-third-party-service-to-display-jekyll-build-error-messages
93+
- name: Prepare screenshots for upload
94+
if: github.event_name == 'pull_request'
95+
shell: bash
96+
run: |
97+
mkdir -p screenshots-upload
98+
# only files modified during this run
99+
while IFS= read -r screenshot; do
100+
[ -f "$screenshot" ] || continue
101+
appname=$(basename "$(dirname "$screenshot")")
102+
# Sanitize filename: allow letters, digits, dot, underscore, hyphen
103+
safe_name=$(echo "$appname" | tr '[:upper:]' '[:lower:]' | tr -cd 'a-z0-9._-')
104+
cp "$screenshot" "screenshots-upload/${safe_name}.png"
105+
done < <(find database -type f -path '*/screenshot.png' -newer .screenshots_start -print)
106+
ls -la screenshots-upload/ || true
107+
- name: Upload screenshot artifact
108+
if: github.event_name == 'pull_request'
109+
uses: actions/upload-artifact@v4
110+
with:
111+
name: pr-screenshots
112+
path: screenshots-upload/*.png
113+
if-no-files-found: ignore
114+
retention-days: 7
86115
- name: Check log
87116
if: github.event_name == 'pull_request' && github.event.pull_request.user.login == 'probonopd'
88117
shell: bash
@@ -91,13 +120,12 @@ jobs:
91120
grep -r "Running as root without --no-sandbox is not supported" log.txt && MESSAGE="Pending #2563 (\`Running as root without --no-sandbox is not supported\`)." && exit 1
92121
grep -r "version \`GLIBC_.*' not found" && MESSAGE="This was compiled on a too new system and hence cannot run on all still-supported versions of Ubuntu." && exit 1
93122
echo "${MESSAGE}"
94-
SCREENSHOT_URL=$(cat log.txt | grep -o -e "https://i.imgur.com.*.png") || true
95-
if [[ -z "${SCREENSHOT_URL}" ]]; then
96-
echo "No screenshot URL found."
123+
COUNT=$(ls database/*/screenshot.png 2>/dev/null | wc -l)
124+
if [[ "${COUNT}" -eq 0 ]]; then
125+
echo "No screenshot file found."
97126
exit 1
98127
fi
99-
echo "SCREENSHOT_URL=$SCREENSHOT_URL" >> $GITHUB_ENV || true
100-
echo "SCREENSHOT_URL: ${SCREENSHOT_URL}" || true
128+
echo "Found ${COUNT} screenshot file(s)."
101129
# The following is disabled because it gives errors about missing permissions
102130
# whenever a PR is made by anyone but the repo maintainer
103131
# - name: Post Screenshot URL

apps/FireMinipro.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
layout: app
3+
4+
permalink: /FireMinipro/
5+
6+
icons:
7+
- FireMinipro/icons/512x512/fireminipro.png
8+
9+
screenshots:
10+
- FireMinipro/screenshot.png
11+
12+
authors:
13+
- name: Jartza
14+
url: https://github.com/Jartza
15+
16+
links:
17+
- type: GitHub
18+
url: Jartza/fireminipro
19+
- type: Download
20+
url: https://github.com/Jartza/fireminipro/releases
21+
22+
desktop:
23+
Desktop Entry:
24+
Type: Application
25+
Name: FireMinipro
26+
Exec: fireminipro
27+
Icon: fireminipro
28+
Categories: Development
29+
X-AppImage-Version: 0.1.0
30+
AppImageHub:
31+
X-AppImage-Signature: 'directory ''/home/runner/.gnupg'' created keybox ''/home/runner/.gnupg/pubring.kbx''
32+
created [don''t know]: invalid packet (ctb=0a) no signature found the signature
33+
could not be verified. Please remember that the signature file (.sig or .asc)
34+
should be the first file given on the command line.'
35+
X-AppImage-Type: 2
36+
X-AppImage-Architecture: x86_64
37+
---

apps/XtoMarkdown.md.md

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
---
2+
layout: app
3+
4+
permalink: /XtoMarkdown.md/
5+
description: Convert documents to Markdown
6+
license: GPL-3.0-or-later
7+
8+
icons:
9+
- XtoMarkdown.md/icons/2048x2048/io.github.tx2z.XtoMarkdown.png
10+
screenshots:
11+
- https://raw.githubusercontent.com/tx2z/xtomarkdown/main/screenshots/main-window.png
12+
13+
authors:
14+
- name: tx2z
15+
url: https://github.com/tx2z
16+
17+
links:
18+
- type: GitHub
19+
url: tx2z/xtomarkdown
20+
- type: Download
21+
url: https://github.com/tx2z/xtomarkdown/releases
22+
23+
desktop:
24+
Desktop Entry:
25+
Name: XtoMarkdown
26+
Comment: Convert documents to Markdown
27+
GenericName: Document Converter
28+
Exec: xtomarkdown %F
29+
Icon: io.github.tx2z.XtoMarkdown
30+
Terminal: false
31+
Type: Application
32+
Categories: Utility
33+
Keywords: markdown
34+
StartupWMClass: xtomarkdown
35+
StartupNotify: true
36+
MimeType: application/vnd.openxmlformats-officedocument.wordprocessingml.document
37+
AppImageHub:
38+
X-AppImage-Signature: 'directory ''/home/runner/.gnupg'' created keybox ''/home/runner/.gnupg/pubring.kbx''
39+
created [don''t know]: invalid packet (ctb=0a) no signature found the signature
40+
could not be verified. Please remember that the signature file (.sig or .asc)
41+
should be the first file given on the command line.'
42+
X-AppImage-Type: 2
43+
X-AppImage-Architecture: x86_64
44+
45+
appdata:
46+
Type: desktop-application
47+
ID: io.github.tx2z.XtoMarkdown
48+
Name:
49+
C: XtoMarkdown
50+
Summary:
51+
C: Convert documents to Markdown
52+
Description:
53+
C: >-
54+
<p>XtoMarkdown is a simple drag-and-drop application for converting documents to Markdown format.
55+
It supports a wide variety of input formats including DOCX, PDF, PPTX, HTML, and more.</p>
56+
<p>Features:</p>
57+
58+
<ul>
59+
<li>Drag-and-drop interface for easy conversion</li>
60+
<li>Support for DOCX, PDF, PPTX, XLSX, HTML, RTF, ODT, EPUB, and more</li>
61+
<li>Two conversion engines: Pandoc and MarkItDown</li>
62+
<li>Batch conversion of multiple files</li>
63+
<li>Configurable output location</li>
64+
</ul>
65+
ProjectLicense: GPL-3.0-or-later
66+
Categories:
67+
- Utility
68+
- Office
69+
Keywords:
70+
C:
71+
- markdown
72+
- converter
73+
- docx
74+
- pdf
75+
- document
76+
Url:
77+
homepage: https://github.com/tx2z/xtomarkdown
78+
bugtracker: https://github.com/tx2z/xtomarkdown/issues
79+
Launchable:
80+
desktop-id:
81+
- io.github.tx2z.XtoMarkdown.desktop
82+
Provides:
83+
binaries:
84+
- xtomarkdown
85+
Screenshots:
86+
- default: true
87+
caption:
88+
C: Main window with drag-and-drop zone
89+
thumbnails: []
90+
source-image:
91+
url: https://raw.githubusercontent.com/tx2z/xtomarkdown/main/screenshots/main-window.png
92+
lang: C
93+
- caption:
94+
C: Files added and ready for conversion
95+
thumbnails: []
96+
source-image:
97+
url: https://raw.githubusercontent.com/tx2z/xtomarkdown/main/screenshots/file-added.png
98+
lang: C
99+
- caption:
100+
C: Conversion complete
101+
thumbnails: []
102+
source-image:
103+
url: https://raw.githubusercontent.com/tx2z/xtomarkdown/main/screenshots/conversion-complete.png
104+
lang: C
105+
- caption:
106+
C: Preferences dialog
107+
thumbnails: []
108+
source-image:
109+
url: https://raw.githubusercontent.com/tx2z/xtomarkdown/main/screenshots/preferences.png
110+
lang: C
111+
- caption:
112+
C: Engine preferences per file format
113+
thumbnails: []
114+
source-image:
115+
url: https://raw.githubusercontent.com/tx2z/xtomarkdown/main/screenshots/preferences-engines.png
116+
lang: C
117+
Releases:
118+
- version: 1.0.0
119+
unix-timestamp: 1764115200
120+
description:
121+
C: >-
122+
<p>Initial release with support for:</p>
123+
124+
<ul>
125+
<li>DOCX, PDF, PPTX, HTML, RTF, ODT, EPUB conversion</li>
126+
<li>Pandoc and MarkItDown engines</li>
127+
<li>Drag-and-drop interface</li>
128+
<li>Batch conversion of multiple files</li>
129+
<li>Configurable output location and engine preferences</li>
130+
</ul>
131+
ContentRating:
132+
oars-1.1: {}
133+
---

0 commit comments

Comments
 (0)