Skip to content

Commit

Permalink
update github workflow to pickup pinner env vars
Browse files Browse the repository at this point in the history
Signed-off-by: Pranay Valson <pranay.valson@gmail.com>
  • Loading branch information
noslav committed Jan 19, 2024
1 parent adb855b commit 630707d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,28 @@ jobs:
password: ${{ secrets.GCR_JSON_KEY }}

- uses: actions/checkout@v2
- name: Build & Publish the Docker image
run: |
docker buildx create --name builder --use --platform=linux/amd64,linux/arm64 && docker buildx build --platform=linux/amd64,linux/arm64 . -t gcr.io/covalent-project/bsp-agent:latest --push
# - name: Build & Publish the Docker image
# run: |
# docker buildx create --name builder --use --platform=linux/amd64,linux/arm64 && docker buildx build --platform=linux/amd64,linux/arm64 . -t gcr.io/covalent-project/bsp-agent:latest --push

- name: Create .env file
run: |
touch .env
echo PRIVATE_KEY=${{ secrets.PRIVATE_KEY }} >> .env
echo RPC_URL=${{ secrets.RPC_URL }} >> .env
echo WEB3_JWT=${{ secrets.WEB3_JWT }} >> .env
{
echo "PRIVATE_KEY=${{ secrets.PRIVATE_KEY }}"
echo "RPC_URL=${{ secrets.RPC_URL }}"
echo "WEB3_JWT=${{ secrets.WEB3_JWT }}"
echo "W3_AGENT_KEY=${{ secrets.W3_AGENT_KEY }}"
echo "PROOF_OUT_HEX=${{ secrets.PROOF_OUT_HEX }}"
echo "W3_DELEGATION_FILE=${{ secrets.W3_DELEGATION_FILE }}"
} >> .env
cat .env
- name: Load .env file
uses: xom9ikk/dotenv@v1.0.2

- name: Run containers
run: docker-compose -f "docker-compose-ci.yml" up --build --remove-orphans --exit-code-from agent
run: docker-compose --env-file ".env" -f "docker-compose-ci.yml" up --build --remove-orphans --exit-code-from agent

- name: Check running agent
run: docker inspect bsp-agent
Expand Down
3 changes: 0 additions & 3 deletions docker-compose-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ services:
chmod +x proof_from_hex.out;
mv ./proof_from_hex.out /root/.ipfs/proof_from_hex.out;
./ipfs-server -port 3001 -w3-agent-key $W3_AGENT_KEY -w3-delegation-file $W3_DELEGATION_FILE;"
expose:
- "4001:4001"
- "3001:3001"
environment:
- W3_AGENT_KEY=${W3_AGENT_KEY}
- W3_DELEGATION_FILE=${W3_DELEGATION_FILE}
Expand Down

0 comments on commit 630707d

Please sign in to comment.