Upload CSV to partner portal #181
Workflow file for this run
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
name: Validate Webhook Templates | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
validate: | |
name: Validate Webhook Templates | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "~1.20" | |
cache-dependency-path: "schema/go.sum" | |
- name: Build validate tool | |
run: | | |
cd schema | |
go build -o ../bin/validate ./cmd/validate.go | |
- name: Validate webhook templates | |
run: ./bin/validate | |
csv: | |
name: Upload CSV to Airtable | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Install Node.js dependencies | |
run: npm ci | |
- name: Create templates.csv | |
run: node csv.js | |
- name: Upload to Airtable | |
run: | | |
curl -X POST ${{ secrets.AIRTABLE_WEBHOOKS_API_ENDPOINT }} \ | |
-H "Authorization: Bearer ${{ secrets.AIRTABLE_WEBHOOKS_API_KEY }}" \ | |
-H "Content-Type: text/csv" \ | |
--data-binary "@bin/templates.csv" |