Skip to content

Commit

Permalink
Merge pull request rancher-sandbox#6679 from mook-as/e2e/screenshots-…
Browse files Browse the repository at this point in the history
…name-match-docs

CI: Screenshots: package for docs
  • Loading branch information
Nino-K authored Apr 9, 2024
2 parents 4308edf + 41be553 commit e191c35
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/screenshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,54 @@ jobs:
logs/
e2e/reports/
screenshots/output/
package:
name: Package screenshots for docs
needs: screenshot
concurrency:
group: "${{ github.workflow_ref }} (package)"
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
pattern: screenshots-*.zip
merge-multiple: true
path: ${{ github.workspace }}/in
- name: Rename images
run: |
while IFS= read -d $'\0' -r line; do
IFS=/ read -r in platform scheme window name <<<"$line"
if [[ "$scheme" != "light" ]]; then
continue
fi
case "$platform" in
darwin) platform=macOS;;
linux) platform=Linux;;
win32) platform=Windows;;
esac
if [[ "$window" == "main" ]]; then
window="ui-main"
fi
if [[ $name =~ ^[0-9]+_ ]]; then
name="${name#*_}"
fi
out="out/${window}/${platform}_${name}"
mkdir -p "$(dirname "$out")"
cp "$line" "$out"
echo "$out"
done < <(find in -name '*.png' -print0)
- name: Generate introduction image
run: |
# The intro image consists of the mac image on the left and the Windows
# image on the right, each showing Kubernetes settings.
sudo DEBIAN_FRONTEND=noninteractive apt-get install graphicsmagick # spellcheck-ignore-line
mkdir -p out/getting-started
gm composite -gravity center in/darwin/light/preferences/*_kubernetes.png in/darwin/light/main/*_General.png darwin.png
gm composite -gravity center in/win32/light/preferences/*_kubernetes.png in/win32/light/main/*_General.png win32.png
gm convert darwin.png win32.png +append out/getting-started/introduction_preferences_tabKubernetes.png
- uses: actions/upload-artifact@v4
with:
name: screenshots.zip
path: out
if-no-files-found: error
overwrite: true

0 comments on commit e191c35

Please sign in to comment.