-
Notifications
You must be signed in to change notification settings - Fork 12
50 lines (42 loc) · 1.54 KB
/
csv-to-table-current.yml
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
43
44
45
46
47
48
49
50
name: CSV to Table md
on:
push:
branches:
- master
paths:
- content/funding-opportunities/ReSA_Funding_Current_opportunities.csv
jobs:
build:
name: CSV as Table
runs-on: ubuntu-latest
steps:
- name: "📥 Checkout Repo"
uses: actions/checkout@master
- name: "💾 Github Repository Metadata"
uses: varunsridharan/action-repository-meta@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "📡 Read CSV"
id: csv
uses: juliangruber/read-file-action@v1
with:
path: ./content/funding-opportunities/ReSA_Funding_Current_opportunities.csv
- name : "🧮 Convert Current opportunities CVS to Table"
id: csv-table-output
uses: petems/csv-to-md-table-action@master
with:
csvinput: ${{ steps.csv.outputs.content }}
- name: "🔡 Set ENV TABLE_VAR"
run: |
echo 'TABLE_VAR<<EOF' >> $GITHUB_ENV
echo "${{steps.csv-table-output.outputs.markdown-table}}" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: "💫 Update current.md"
uses: varunsridharan/action-dynamic-readme@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
global_template_repository: varunsridharan/varunsridharan
commit_message: '📝 docs(current): Current Opportunities update'
files: |
content/funding-opportunities/templates/30-current.md=content/funding-opportunities/30-current.md