Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/burnett01/actions-drawio
Convert draw.io documents to jpeg, png, svg, pdf using drawio-batch.
https://github.com/burnett01/actions-drawio
action actions assets convert diagramm docker documents drawio drawio-batch export github-actions images
Last synced: 8 days ago
JSON representation
Convert draw.io documents to jpeg, png, svg, pdf using drawio-batch.
- Host: GitHub
- URL: https://github.com/burnett01/actions-drawio
- Owner: Burnett01
- License: mit
- Created: 2020-04-18T14:38:53.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-07-17T20:53:52.000Z (4 months ago)
- Last Synced: 2024-10-01T23:41:32.131Z (about 1 month ago)
- Topics: action, actions, assets, convert, diagramm, docker, documents, drawio, drawio-batch, export, github-actions, images
- Language: Dockerfile
- Homepage:
- Size: 15.6 KB
- Stars: 15
- Watchers: 1
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# actions-drawio ![CI Tests](https://github.com/Burnett01/actions-drawio/workflows/CI%20Tests/badge.svg)
Convert draw.io compressed XML-documents to ``jpeg|png|svg|pdf`` using [drawio-batch](https://github.com/languitar/drawio-batch).
This action makes use of the heavily optimized Docker image [(alpine-drawio-batch)](https://github.com/Burnett01/docker-images/tree/alpine-drawio-batch).
---
## Usage
You can run this action by using the ``with:`` block
```yml
steps:
- uses: actions/checkout@v2
- name: Convert digramm to png
uses: Burnett01/[email protected]
with:
src: diagramm.drawio
dest: diagramm.png
```**Inputs**
+ ``quality`` The quality for png & jpeg (eg. 100)
+ ``scale`` The scale (eg. 1.0)
+ ``src`` The source file (eg. input.drawio)
+ ``dest`` The destination file (eg. output.jpeg)
---
## Combinations
You can combine this actions with other ones, such as [upload-artifact](https://github.com/actions/upload-artifact):
```yml
steps:
- uses: actions/checkout@v2
- name: Convert test file to png image
uses: Burnett01/[email protected]
with:
src: test.drawio
dest: test.png
- name: Upload image as artifact
uses: actions/upload-artifact@v1
with:
name: png
path: test.png
```---
## Note
If you are using uncompressed drawio XML documents, this action will not work.
The underlaying module only supports compressed XML-documents.Thus, you will have to export your draw.io XML document as "compressed".
[Check out this post to see how this is one.](https://github.com/Burnett01/actions-drawio/issues/1#issuecomment-830344814)
---
## Demo/Tests
Check the Actions tab for a live demo:
[Live Demo](https://github.com/Burnett01/actions-drawio/actions?query=workflow%3A%22CI+Tests%22)