Skip to content

Commit

Permalink
add workflow to upload bundle from CI to estuary (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzo authored Apr 7, 2022
1 parent e1f1d5a commit ca81f77
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,19 @@ jobs:
with:
command: ${{ matrix.command }}
args: ${{ matrix.args }}
- name: making bundle
- name: make bundle
if: ${{ matrix.command == 'build' }}
run: ./build-bundle.sh
- name: Publishing build artifacts
- name: upload bundle
if: ${{ matrix.command == 'build' }}
env:
ESTUARY_TOKEN: ${{ secrets.ESTUARY_TOKEN }}
run: ./upload-bundle.sh
- name: Publishing build artifacts to github
if: ${{ matrix.command == 'build' }}
uses: actions/upload-artifact@v2
with:
name: bundle
path: output/builtin-actors.car
path: |
output/builtin-actors.car
output/upload.json
7 changes: 7 additions & 0 deletions upload-bundle.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

set -e

bundle=output/builtin-actors.car
curl -k -X POST -F "data=@${bundle};type=application/octet-stream;filename=\"${bundle}\"" -H "Authorization: Bearer $ESTUARY_TOKEN" -H "Content-Type: multipart/form-data" https://shuttle-4.estuary.tech/content/add > output/upload.json
cat output/upload.json

0 comments on commit ca81f77

Please sign in to comment.