-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upload CSV to partner portal #96
Conversation
The CSV workflow is still giving an error now, but that is because there is no URL specified, so that has to be added after the PR is merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The node_modules
folder is not supposed to be checked in to version control. Please add that to .gitignore
and delete it here.
.github/workflows/validate.yml
Outdated
csv: | ||
if: github.ref == 'refs/heads/master' | ||
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 bin/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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's separate this out to a separate action. Ex: upload-to-airtable.yml
and make that action run on a push to the master
branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm conditionally approving this out of necessity (as discussed on Slack). There are no tests to validate if csv.js
file has all the correct fields. I trust that this is manually tested for now.
Summary
Add a script, like the device repository, to sync the contents of this repo to Airtable so it can be used with the Partner Portal.
Changes
Notes for Reviewers
@benolayinka let me know if this seems correct.
Checklist