-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync CSV and Excel fro LSR Mappings (#80)
Automated conversion from csv to excel for LSR mappings
- Loading branch information
Showing
6 changed files
with
608 additions
and
469 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,42 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "Mapping to LSRs/Mental Health Ontology mapping to LSRs.xlsx" | ||
permissions: | ||
contents: write | ||
jobs: | ||
get_context: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
action_bot_email: "41898282+github-actions[bot]@users.noreply.github.com" | ||
commit_author: ${{ steps.get_author.outputs.out }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- id: get_author | ||
run: > | ||
echo out=$(git log -1 "$SHA" --format="%aE") >> "$GITHUB_OUTPUT" | ||
env: | ||
SHA: ${{ github.sha }} | ||
convert_to_csv: | ||
runs-on: ubuntu-latest | ||
name: Convert LSR mapping from Excel to CSV | ||
needs: get_context | ||
if: ${{ needs.get_context.outputs.commit_author != needs.get_context.outputs.action_bot_email }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' # caching pip dependencies | ||
- name: Install dependencies | ||
run: pip install -r scripts/requirements.txt | ||
- name: Run conversion | ||
run: python3 scripts/excel2csv.py -i "Mapping to LSRs/Mental Health Ontology mapping to LSRs.xlsx" | ||
- uses: EndBug/add-and-commit@v9 # You can change this to use a specific version. | ||
with: | ||
add: '"Mapping to LSRs"' | ||
default_author: 'github_actions' | ||
message: "Converted LSR mapping Excel to CSV" | ||
push: 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,43 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "Mapping to LSRs/Mental Health Ontology mapping to LSRs.csv" | ||
permissions: | ||
contents: write | ||
jobs: | ||
get_context: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
action_bot_email: "41898282+github-actions[bot]@users.noreply.github.com" | ||
commit_author: ${{ steps.get_author.outputs.out }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- id: get_author | ||
run: > | ||
echo out=$(git log -1 "$SHA" --format="%aE") >> "$GITHUB_OUTPUT" | ||
env: | ||
SHA: ${{ github.sha }} | ||
|
||
convert_to_excel: | ||
runs-on: ubuntu-latest | ||
name: Convert LSR mapping from CSV to Excel | ||
needs: get_context | ||
if: ${{ needs.get_context.outputs.commit_author != needs.get_context.outputs.action_bot_email }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' # caching pip dependencies | ||
- name: Install dependencies | ||
run: pip install -r scripts/requirements.txt | ||
- name: Run conversion | ||
run: python3 scripts/csv2excel.py -i "Mapping to LSRs/Mental Health Ontology mapping to LSRs.csv" | ||
- uses: EndBug/add-and-commit@v9 # You can change this to use a specific version. | ||
with: | ||
add: '"Mapping to LSRs"' | ||
default_author: 'github_actions' | ||
message: "Converted LSR mapping CSV to Excel" | ||
push: true |
Oops, something went wrong.