-
-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (35 loc) · 1.18 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Generate Command Output Image
# Controls when the action will run. Triggers the workflow on push events
on:
push:
branches: [ master ]
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
# Check out repository under $GITHUB_WORKSPACE, so the job can access it
- uses: actions/checkout@v3
# Setup apt dependencies
- name: Setup dependencies
run: |
sudo apt install ghostscript fonts-freefont-otf imagemagick
sudo sed -i 's/\(<policy domain="resource" name="width" value="\)[^"]*/\1160KP/' /etc/ImageMagick-6/policy.xml
sudo sed -i 's/\(<policy domain="resource" name="height" value="\)[^"]*/\1160KP/' /etc/ImageMagick-6/policy.xml
shell: bash
# Run the script
- name: Run script file
run: |
chmod +x wix-cli.sh
./wix-cli.sh img_stdout
shell: bash
# Commit and push changes
- name: Commit changes
run: |
git config --local user.name "hwixley"
git config --local user.email "[email protected]"
git add .generated/wixcli-output-preview.png
git commit -m "Update wix command output image"
git push