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

Fix workflow #15

Merged
merged 13 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion .github/workflows/produce-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ jobs:
- name: Generate Thumbnail for Page 1
uses: jruipinto/ImageMagick-action@v1
with:
command: convert -density 700 -resize 10% -append -quality 98 -alpha remove rb-cv.pdf[0] rb-cv-thumbnail-p1.jpg
command: |
sudo sed -i 's/rights="none" pattern="PDF"/rights="read | write" pattern="PDF"/' /etc/ImageMagick-6/policy.xml
convert -density 700 -resize 10% -append -quality 98 -alpha remove rb-cv.pdf[0] rb-cv-thumbnail-p1.jpg
- name: Generate Thumbnail for Page 2
uses: jruipinto/ImageMagick-action@v1
with:
Expand Down
30 changes: 26 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Tests
name: Test
on: [pull_request, workflow_dispatch]
jobs:

spelling:
name: Spell Check
name: Spelling is correct
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
Expand All @@ -15,7 +15,7 @@ jobs:
shell: bash --noprofile --norc -eo pipefail -o nounset {0}

build_pdf:
name: Create Test PDF
name: Can create PDF
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
path: ./rb-cv.pdf

two_pages:
name: Check Num Pages
name: Is less than three pages
needs: build_pdf
runs-on: ubuntu-latest
steps:
Expand All @@ -62,3 +62,25 @@ jobs:
- name: Length of Document Check
run: cicd/Length.sh
shell: bash --noprofile --norc -eo pipefail -o nounset {0}

can_create_thumbnail:
name: Can create thumbnail
needs: build_pdf
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v2
- name: Download Artifact
uses: actions/download-artifact@master
with:
name: rb-cv.pdf
path: ./
- name: install ghostscript
run: sudo apt install ghostscript -y
- name: Workaround ghostscript vunerability protection
# A vunerabillty that existed in ghostscript no longer exists. This is to work around the temporary protection
# that was put in place.
# https://stackoverflow.com/questions/52998331/imagemagick-security-policy-pdf-blocking-conversion
run: sudo sed -i 's/rights="none" pattern="PDF"/rights="read | write" pattern="PDF"/' /etc/ImageMagick-6/policy.xml
- name: Run convert command
run: convert -density 700 -resize 10% -append -quality 98 -alpha remove rb-cv.pdf rb-cv-thumbnail-p1.jpg
Loading