-
Notifications
You must be signed in to change notification settings - Fork 428
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
fix(integration-templates): add workflow and edit existing #2337
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: 'Sync Integration Templates' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure I follow why we need this extra action. Aren't the merge triggering the templates upload action above done by us, even on external contributions? if yes what's the permissions issue? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is more of a fail safe than anything. It’s a force sync of all templates since the regular one looks just for changed files. For some reason this action contribution #2242 didnt get uploaded to s3. In that instance we need a way to sync integration templates. I need to look into exactly why it failed but I assumed it was a permissions issue but not 100% sure. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion for future: this could be done at the start of the server process instead |
||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
sync-integration-templates: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install nango CLI | ||
run: | | ||
npm install -g nango | ||
|
||
- name: Sync all templates | ||
run: | | ||
cd integration-templates | ||
for dir in $(ls -d */); do | ||
mkdir -p /tmp/nango-temp/nango-integrations/$dir | ||
|
||
cp $dir/nango.yaml /tmp/nango-temp/nango-integrations/ | ||
cp -r $dir/* /tmp/nango-temp/nango-integrations/$dir/ | ||
|
||
pushd /tmp/nango-temp/nango-integrations | ||
nango compile | ||
popd | ||
|
||
cp -r /tmp/nango-temp/nango-integrations/dist ./$dir/dist | ||
|
||
rm -rf /tmp/nango-temp | ||
|
||
aws s3 sync $dir s3://${{ secrets.AWS_BUCKET_NAME }}/$dir/ | ||
done | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
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.
if you want more bash magic I think you can do this with a one liner:
Removing the last 2 elements of the path with the first curly bracket and re-adding the last element in the second