generated from rendercv/rendercv-pipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7d73790
Showing
31 changed files
with
1,283 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/python | ||
{ | ||
"name": "Python 3", | ||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | ||
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye", | ||
// Use 'onCreateCommand' to run commands after the container is created inside the container: | ||
"onCreateCommand": "pip install --user -r requirements.txt", | ||
// Configure tool-specific properties. | ||
"customizations": { | ||
"vscode": { | ||
"extensions": ["redhat.vscode-yaml", "mathematic.vscode-pdf"] | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Release a CV | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" # Any tag pushed to the repository | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
call_rendercv_workflow: | ||
name: RenderCV | ||
uses: ./.github/workflows/rendercv.yaml | ||
|
||
build: | ||
needs: call_rendercv_workflow | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Download RenderCV Output | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: RenderCV Output | ||
path: rendercv_output | ||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: | | ||
rendercv_output/*_CV.pdf | ||
rendercv_output/*_CV.tex | ||
generate_release_notes: true | ||
make_latest: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Render a CV | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_call: # to make the workflow triggerable from other workflows (release.yaml) | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
rendercv: | ||
name: RenderCV | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
- name: Install RenderCV | ||
run: | | ||
pip install -r requirements.txt | ||
- name: RenderCV | ||
run: | | ||
cd src | ||
cv_file=$(find . -maxdepth 1 -type f -name "*_CV.yaml" | head -n 1) | ||
if [ -z "$cv_file" ]; then | ||
echo "No RenderCV file found!" | ||
exit 1 | ||
fi | ||
cd .. | ||
rendercv render src/$cv_file --pdf-path ${cv_file%.yaml}.pdf --markdown-path README.md --latex-path ${cv_file%.yaml}.tex | ||
- name: Upload rendercv_output as an artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: RenderCV Output | ||
path: rendercv_output | ||
- uses: dorny/paths-filter@v3 | ||
id: changes | ||
with: | ||
base: HEAD | ||
filters: | | ||
cv: | ||
- '*_CV.tex' | ||
- 'README.md' | ||
- name: Push the changes | ||
if: steps.changes.outputs.cv == 'true' | ||
run: | | ||
git config --global user.name "${{ github.actor }}" | ||
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | ||
git add -A | ||
git commit -m "render the latest CV" | ||
git push |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
__pycache__/ | ||
rendercv_output/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Run RenderCV", | ||
"type": "debugpy", | ||
"request": "launch", | ||
"module": "rendercv", | ||
"args": [ | ||
"render", | ||
"src/John_Doe_CV.yaml", | ||
"--pdf-path", | ||
"John_Doe_CV.pdf", | ||
"--markdown-path", | ||
"README.md" | ||
] | ||
} | ||
] | ||
} |
Binary file not shown.
Oops, something went wrong.