-
Notifications
You must be signed in to change notification settings - Fork 4
42 lines (42 loc) · 1.4 KB
/
convert_lsr_mappings_to_csv.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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