Testing edited workflow #27
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Converting outbound checklists from .md to .pdf | ||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
# Paths can be used to only trigger actions when you have edited checklist files or assets directory | ||
paths: | ||
- 'tier*/checklist.md' | ||
- 'assets/**' | ||
jobs: | ||
get-changed-directories: | ||
name: Get changed directories | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get changed directories | ||
id: get-dirs | ||
uses: tj-actions/changed-files@v45 | ||
with: | ||
dir_names: "true" | ||
- name: List all changed directories | ||
env: | ||
ALL_CHANGED_FILES: ${{ steps.get-dirs.outputs.all_changed_files }} | ||
run: | | ||
for file in ${ALL_CHANGED_FILES}; do | ||
echo "$file was changed" | ||
done | ||
outputs: | ||
tiers: ${{ steps.get-dirs.outputs.all_changed_files }} | ||
converttopdf: | ||
name: Build PDF | ||
runs-on: ubuntu-latest | ||
needs: get-updated-files | ||
Check failure on line 34 in .github/workflows/markdownToPDF.yml GitHub Actions / Converting outbound checklists from .md to .pdfInvalid workflow file
|
||
permissions: | ||
contents: write # Set permissions to allow writes to the repository | ||
strategy: | ||
matrix: | ||
tier: ${{ needs.get-updated-files.outputs.tiers }} # List of directories | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
- name: Generate PDF for ${{ matrix.tier }} | ||
uses: baileyjm02/markdown-to-pdf@v1 | ||
with: | ||
input_path: ${{ matrix.tier }}/checklist.md | ||
images_dir: assets | ||
image_import: ../assets | ||
output_dir: ${{ matrix.tier }}/ | ||
# Default is true, can set to false to only get PDF files | ||
build_html: false | ||
- name: Commit and push ${{ matrix.tier }} PDF | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: "Updated ${{ matrix.tier }} checklist pdf" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Required for authentication |