Skip to content

Commit ca81f77

Browse files
authored
add workflow to upload bundle from CI to estuary (#198)
1 parent e1f1d5a commit ca81f77

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,19 @@ jobs:
7373
with:
7474
command: ${{ matrix.command }}
7575
args: ${{ matrix.args }}
76-
- name: making bundle
76+
- name: make bundle
7777
if: ${{ matrix.command == 'build' }}
7878
run: ./build-bundle.sh
79-
- name: Publishing build artifacts
79+
- name: upload bundle
80+
if: ${{ matrix.command == 'build' }}
81+
env:
82+
ESTUARY_TOKEN: ${{ secrets.ESTUARY_TOKEN }}
83+
run: ./upload-bundle.sh
84+
- name: Publishing build artifacts to github
8085
if: ${{ matrix.command == 'build' }}
8186
uses: actions/upload-artifact@v2
8287
with:
8388
name: bundle
84-
path: output/builtin-actors.car
89+
path: |
90+
output/builtin-actors.car
91+
output/upload.json

upload-bundle.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
bundle=output/builtin-actors.car
6+
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
7+
cat output/upload.json

0 commit comments

Comments
 (0)