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

Created workflow to convert checklist markdown to pdf #186

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d2000a5
Created workflow to convert checklist markdown to pdf
natalialuzuriaga Oct 23, 2024
1e48b96
Testing the workflow trigger
natalialuzuriaga Oct 23, 2024
615c94e
Fixe to workflow
natalialuzuriaga Oct 23, 2024
a8353b5
Fixes to workflow
natalialuzuriaga Oct 23, 2024
abefdc9
Fixes to workflow for testing
natalialuzuriaga Oct 23, 2024
fcc2053
fix links
IsaacMilarky Oct 8, 2024
a33605a
Update release-guidelines-template.md
IsaacMilarky Oct 7, 2024
8fba131
Converted Tier 4 into markdown
NoobNoob06 Oct 18, 2024
4c78c19
Fixed Links in table of content
NoobNoob06 Oct 18, 2024
a413a62
Updated links to use the tier4 version
NoobNoob06 Oct 21, 2024
73e37a2
Added link for Static Code analysis tool
NoobNoob06 Oct 21, 2024
d5f8839
Added review project metadata section to tier 1 checklist
natalialuzuriaga Oct 24, 2024
ca36190
Added review project metadata section to all tiers
natalialuzuriaga Oct 24, 2024
0c67636
Updated heading type for new section
natalialuzuriaga Oct 24, 2024
71b094c
Edit heading type for toolkit section
natalialuzuriaga Oct 24, 2024
4120be9
Cleaned up tiers 2-4 checklists
natalialuzuriaga Oct 25, 2024
663a268
Cleaned up tier 1 checklist
natalialuzuriaga Oct 25, 2024
54ae6d9
Resolve misalignments in questions section
natalialuzuriaga Oct 25, 2024
d068144
Upgrade github action versions
natalialuzuriaga Oct 25, 2024
dc9d669
Updated location of output
natalialuzuriaga Oct 25, 2024
804b206
Removed old checklist.pdf
natalialuzuriaga Oct 25, 2024
c604778
listing files for debugging
natalialuzuriaga Oct 25, 2024
051b342
added output_dir param
natalialuzuriaga Oct 25, 2024
7db462f
Edit path
natalialuzuriaga Oct 25, 2024
b41c6e9
Remove cat command
natalialuzuriaga Oct 25, 2024
8d512b5
Fix image path
natalialuzuriaga Oct 25, 2024
cb5c9e4
Fix image path and import
natalialuzuriaga Oct 25, 2024
b36ca25
Update image path import
natalialuzuriaga Oct 25, 2024
d7734e0
Merge branch 'dev' into nat/markdown-to-pdf
natalialuzuriaga Oct 25, 2024
047f138
Add job to detect tier of checklist that was modified
natalialuzuriaga Oct 25, 2024
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
55 changes: 55 additions & 0 deletions .github/workflows/markdownToPDF.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Outbound Checklists Markdown to PDF
# This workflow is triggered on pushes to the repository.
on:
pull_request:
types: [opened, synchronize]
# Paths can be used to only trigger actions when you have edited certain files, such as a file within the /docs directory
paths:
- 'tier*/checklist.md'
- 'assets/**'

jobs:
detect-tier:
runs-on: ubuntu-latest
outputs:
tier: ${{ steps.extract-tier.outputs.tier }}
steps:
- name: Extract tier from changed files
id: extract-tier
run: |
# Get the list of modified files
files=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})

cat files

# Extract tier number from paths that match tier*/checklist.md
for file in $files; do
if [[ "$file" =~ ^(tier[0-9]+)/checklist.md$ ]]; then
echo "Tier matched: ${BASH_REMATCH[1]}"
echo "tier=${BASH_REMATCH[1]}" >> $GITHUB_ENV
echo "::set-output name=tier::${BASH_REMATCH[1]}"
break
fi
done

converttopdf:
name: Build PDF
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: baileyjm02/markdown-to-pdf@v1
with:
input_path: tier1/checklist.md
images_dir: assets
image_import: ../assets
output_dir: tier1/
# Default is true, can set to false to only get PDF files
build_html: false
- name: List files in root
run: ls -a
- name: List files in tier 1
run: ls -a tier1
- uses: actions/upload-artifact@v4
with:
name: checklist-generated
path: tier1/checklist.pdf
2 changes: 1 addition & 1 deletion tier1/checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ repolinter lint .

3. The result produces a list of files section existence checks, indicating whether each requirement was met or not.

![repolinter results](../assets/repolinter-results.png)
<img src="../assets/repolinter-results.png" alt="repolinter results">

#### Running repolinter on your repository via GitHub Actions
1. Add the tier-specific [checks.yml](https://github.com/DSACMS/repo-scaffolder/blob/main/tier1/%7B%7Bcookiecutter.project_slug%7D%7D/.github/workflows/checks.yml) to the github directory of your project. The file includes a job that runs a repolinter called [repolinter-checks](https://github.com/DSACMS/repo-scaffolder/blob/main/tier1/%7B%7Bcookiecutter.project_slug%7D%7D/.github/workflows/checks.yml#L13)
Expand Down
Binary file removed tier1/checklist.pdf
Binary file not shown.
Loading