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

Rework image generation workflow #235

Merged
merged 95 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
63d98b0
new api endpoint implemented
TVRiddle Nov 22, 2023
afd54d3
Merge pull request #224 from gematik/HOTFIX_New_Cleanup_Endpoint_Test…
TVRiddle Nov 23, 2023
3ead26b
Adds room version to test api
Beff42 Jan 19, 2024
e4aef75
Adds room version to releaseNotes
Beff42 Jan 19, 2024
7143484
Bumps version number
Beff42 Jan 19, 2024
a4961d1
Merge pull request #225 from gematik/gematik/HOTFIX_Add_room_version
TVRiddle Jan 19, 2024
e7a05b7
fix links from idp.adoc to internal requirements documents
marcusfey Jan 22, 2024
6f7d025
Adds better documentation of where the mxid is required in its url fo…
Beff42 Feb 16, 2024
2e999ca
Fixes issue with code generation
Beff42 Feb 27, 2024
4879286
Merge pull request #229 from gematik/gematik/HOTFIX_Fixes_formatting
Beff42 Feb 27, 2024
bdc43ca
new tags in TiMessengerTestTreiber.yaml
gem-aw Mar 28, 2024
cf5fd17
Merge remote-tracking branch 'origin/gematik/HOTFIX_Restructures_endp…
Beff42 Mar 28, 2024
2f777f3
Merge pull request #232 from gematik/gematik/HOTFIX_Restructures_endp…
Beff42 Mar 28, 2024
74e72df
TIM-TS 446: allow FHIR enum state "off"
marlenebuelt Apr 15, 2024
9ded2b4
TIM-TS 446: added correct versions
marlenebuelt Apr 15, 2024
d921668
Updates release version
Beff42 Apr 15, 2024
dbe5750
Merge pull request #234 from gematik/HOTFIX_changes_endpoint_enum_to_…
Beff42 Apr 15, 2024
c15b9c8
Marks required properties as required (#233)
Beff42 Apr 16, 2024
52065fc
Fix typo
Johennes Mar 19, 2024
0464a2d
Speed up image generation workflow
Johennes May 10, 2024
99c9ddd
Commit from GitHub Actions (Generate PlantUML & draw.io images)
Johennes May 10, 2024
c7ac750
Split workflow
Johennes May 13, 2024
21dbe00
Commit from GitHub Actions (PlantUML images)
Johennes May 13, 2024
260cf9e
Pull with rebase before committing
Johennes May 13, 2024
83d4644
Nuke plantuml images
Johennes May 13, 2024
f130cd5
Stash before pulling
Johennes May 13, 2024
40d3ac5
Commit from GitHub Actions (PlantUML images)
Johennes May 13, 2024
d3f98f9
Commit from GitHub Actions (draw.io images)
Johennes May 13, 2024
8e7f10b
Update image paths
Johennes May 13, 2024
4944e59
Uncomment path filters
Johennes May 13, 2024
ede2fa0
Run workflows on change to self
Johennes May 13, 2024
47511ce
Reset images folder
Johennes May 15, 2024
d5011bd
Merge branch 'tim-epa-fdv' into johannes/generate-images
Johennes May 15, 2024
5321be4
Commit from GitHub Actions (PlantUML images)
Johennes May 15, 2024
258160a
Commit from GitHub Actions (draw.io images)
Johennes May 15, 2024
3d6875e
Reset files pulled in from main
Johennes May 15, 2024
68b73fc
Nuke diagrams
Johennes May 15, 2024
e2d322d
Extract individual pages
Johennes May 15, 2024
b0d5227
Commit from GitHub Actions (draw.io images)
Johennes May 15, 2024
cf1b337
Use correct binary name
Johennes May 15, 2024
f631b58
Commit from GitHub Actions (draw.io images)
Johennes May 15, 2024
4b6cfe1
Revert "Use correct binary name"
Johennes May 15, 2024
d54b217
Revert "Extract individual pages"
Johennes May 15, 2024
6a735d5
Split files with more than one diagram
Johennes May 15, 2024
7cb3f34
Add lint workflow
Johennes May 15, 2024
5a68a9b
Commit from GitHub Actions (draw.io images)
Johennes May 15, 2024
557d8d8
Fix name
Johennes May 15, 2024
4b73179
Revert "Split files with more than one diagram"
Johennes May 15, 2024
f63a7f2
Commit from GitHub Actions (draw.io images)
Johennes May 15, 2024
dd5bbad
Revert "Revert "Split files with more than one diagram""
Johennes May 15, 2024
6fbe4ec
Also run on push to main
Johennes May 15, 2024
cbff292
Commit from GitHub Actions (draw.io images)
Johennes May 15, 2024
dee2c15
Remove spaces
Johennes May 15, 2024
5b76abe
Commit from GitHub Actions (draw.io images)
Johennes May 15, 2024
6a1a742
Fix paths
Johennes May 15, 2024
78c80fa
Add job for verifying image references
Johennes May 16, 2024
50df983
Don't pushd/popd per location
Johennes May 16, 2024
8c0cb55
Use basename
Johennes May 16, 2024
e95fbcd
Output pwd and location
Johennes May 16, 2024
40c6cb1
Insert command
Johennes May 16, 2024
aab5007
Add quotes
Johennes May 16, 2024
6b5a4b6
Nuke drawio exports
Johennes May 16, 2024
556521f
Also run on changes to generated files
Johennes May 16, 2024
901bc8b
Commit from GitHub Actions (draw.io images)
Johennes May 16, 2024
4613b0b
empty
Johennes May 16, 2024
3d0aace
Output tree
Johennes May 16, 2024
0274348
Output literal
Johennes May 16, 2024
f1f46a8
Remove magic bytes
Johennes May 16, 2024
c016c75
Move file
Johennes May 16, 2024
88c3e42
Move file back
Johennes May 16, 2024
09c54fe
Commit from GitHub Actions (draw.io images)
Johennes May 16, 2024
37eedee
Fix case
Johennes May 16, 2024
cce77c8
Try using image macro
Johennes May 16, 2024
9ead429
Use block image
Johennes May 16, 2024
a1cecf9
Try using align attribute
Johennes May 16, 2024
58efe9b
Revert to original version
Johennes May 16, 2024
20531a1
Use image block
Johennes May 16, 2024
5b1a520
Use image block
Johennes May 16, 2024
0a9ffa7
Use inline image
Johennes May 16, 2024
11c7a97
Insert back block delimiters
Johennes May 16, 2024
49fb8ab
Replace remaining imgs
Johennes May 16, 2024
fd3bf8c
Nuke puml exports
Johennes May 16, 2024
4a5995f
Commit from GitHub Actions (PlantUML images)
Johennes May 16, 2024
0ada0b4
Remove and assert absence of puml output file names
Johennes May 16, 2024
a17ed66
Commit from GitHub Actions (PlantUML images)
Johennes May 16, 2024
b548e49
empty
Johennes May 16, 2024
3ad1d70
Ensure absence of img tags
Johennes May 16, 2024
e2253fc
Run lint as part of export
Johennes May 16, 2024
d602b6e
Merge workflows and add linting
Johennes May 16, 2024
669081b
Add shell
Johennes May 16, 2024
1e1a772
Remove empty line
Johennes May 16, 2024
1e875e7
Fix file names
Johennes May 16, 2024
944da5c
Fix name
Johennes May 16, 2024
5683214
Nuke images
Johennes May 16, 2024
d6f3d3c
Commit from GitHub Actions (Generate images)
Johennes May 16, 2024
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
69 changes: 69 additions & 0 deletions .github/actions/lint-asciidoc/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Lint AsciiDoc

runs:
using: "composite"
steps:
- name: Verify image references
shell: bash
run: |
function err {
>&2 echo -e "\033[0;31m$@\033[0m"
}

rc=0

while read -r file; do
echo "Checking $file"

root=$(grep "^:imagesdir:" "$file" | sed -E "s/^:imagesdir:[[:space:]]*//")
if [[ ! -z "$root" ]]; then
if [[ "$root" == /* ]]; then
root=$(git rev-parse --show-toplevel)$root
fi
if [[ ! "$root" == */ ]]; then
root=$root/
fi
fi
echo "Found imagedir ${root:-<null>}"

pushd "$(dirname "$file")" > /dev/null

while read -r location; do
echo "Checking location $location"

if [[ "$location" == http* ]]; then
if ! curl --head --silent --fail "$location" 2>&1 > /dev/null; then
err "$file references non-existent image $location"
rc=1
fi
else
if [[ ! -f "$root$location" ]]; then
err "$file references non-existent image $location with imagedir ${root:-<null>}"
rc=1
fi
fi
done < <(grep -oE "image:+[^\[]*" "$(basename "$file")" | sed -E "s/^image:+//g")

popd > /dev/null
done < <(find . -type f -name "*.adoc")

exit $rc

- name: Verify absence of <img> tags
shell: bash
run: |
function err {
>&2 echo -e "\033[0;31m$@\033[0m"
}

rc=0

while read -r file; do
echo "Checking $file"

if grep -q "<img" "$file"; then
err "$file contains forbidden <img> tags. Use AsciiDoc image macros instead."
fi
done < <(find . -type f -name "*.adoc")

exit $rc
24 changes: 24 additions & 0 deletions .github/actions/lint-drawio/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lint draw.io

runs:
using: "composite"
steps:
- name: Verify number of diagrams
shell: bash
run: |
function err {
>&2 echo -e "\033[0;31m$@\033[0m"
}

rc=0

while read -r file; do
echo "Checking $file"

if [[ $(grep "<diag" "$file" | wc -l) -ne 1 ]]; then
err "$file does not contain exactly one diagram"
rc=1
fi
done < <(find . -name "*.drawio")

exit $rc
24 changes: 24 additions & 0 deletions .github/actions/lint-plantuml/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lint PlantUML

runs:
using: "composite"
steps:
- name: Verify absence of output file names
shell: bash
run: |
function err {
>&2 echo -e "\033[0;31m$@\033[0m"
}

rc=0

while read -r file; do
echo "Checking $file"

if grep -qE "^@startuml\s+." "$file"; then
err "$file contains forbidden output name in @startuml"
rc=1
fi
done < <(find . -name "*.puml")

exit $rc
51 changes: 0 additions & 51 deletions .github/workflows/GenerateDrawIoImages.yml

This file was deleted.

105 changes: 0 additions & 105 deletions .github/workflows/GeneratePlantumlImages.yml

This file was deleted.

Loading