From 4a7adf65160b38b785ec359d27de3a002225634a Mon Sep 17 00:00:00 2001 From: Petar Maymounkov Date: Mon, 4 Oct 2021 05:56:01 -0700 Subject: [PATCH] Update dnslink for dist.ipfs.io on merge to master (#419) * update dnslink for dist.ipfs.io on ci * fix(ci): context deadline exceeded * chore: cleanup before merge Co-authored-by: Marcin Rataj --- .github/workflows/main.yml | 11 +++++++++++ scripts/ci/setup-ipfs.sh | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 45669ecc..8539a957 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -98,7 +98,12 @@ jobs: persist: runs-on: "ubuntu-latest" needs: sign-macos + environment: Deploy steps: + - name: Setup node + uses: actions/setup-node@v1 + with: + node-version: 15 - uses: actions/checkout@v2 - name: Retrieve signed artifacts uses: actions/download-artifact@v2 @@ -141,6 +146,12 @@ jobs: with: name: diff path: diff + - name: Update DNSLink (if on the main branch) + run: npx dnslink-dnsimple --domain dist.ipfs.io --link /ipfs/${{ steps.cid-reader.outputs.CID }} + if: github.ref == 'refs/heads/master' + env: + DNSIMPLE_TOKEN: ${{ secrets.DNSIMPLE_TOKEN }} + diff: needs: persist diff --git a/scripts/ci/setup-ipfs.sh b/scripts/ci/setup-ipfs.sh index 691b72bd..a0c00c3f 100755 --- a/scripts/ci/setup-ipfs.sh +++ b/scripts/ci/setup-ipfs.sh @@ -29,13 +29,13 @@ sudo sysctl -w net.core.rmem_max=2500000 # init ipfs echo "::group::Set up IPFS daemon" - ipfs init --profile flatfs,server,test,lowpower + ipfs init --profile flatfs,server,test,randomports,lowpower # make flatfs async for faster ci new_config=$( jq '.Datastore.Spec.mounts[0].child.sync = false' ~/.ipfs/config) && echo "${new_config}" > ~/.ipfs/config # restore deterministic port (changed by test profile) ipfs config Addresses.API "/ip4/127.0.0.1/tcp/5001" # wait for ipfs daemon - ipfs daemon --routing=none --enable-gc=false & while (! ipfs id --api "/ip4/127.0.0.1/tcp/5001"); do sleep 1; done + ipfs daemon --enable-gc=false & while (! ipfs id --api "/ip4/127.0.0.1/tcp/5001"); do sleep 1; done echo "::endgroup::"