Skip to content

Commit

Permalink
wip: production dnslink
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Apr 19, 2021
1 parent b9ac75a commit 0463d4b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:

env:
XDG_CACHE_HOME: ${{ github.workspace }}/.cache
GO_IPFS_DIST_URL: 'https://dweb.link/ipns/dist.ipfs.io'

jobs:
build:
Expand Down Expand Up @@ -41,7 +40,7 @@ jobs:

# Separate cache for build dir, we reuse it in release publish workflow
- name: Cache build output
if: ${{ startsWith(github.ref, 'refs/tags/') }}
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/cache@v2
id: build-cache
with:
Expand Down Expand Up @@ -111,8 +110,7 @@ jobs:
name: ipfs-webui_${{ github.sha }}
path: build

# TODO: publish to dev.webui.ipfs.io and webui.ipfs.io
# Pin the built site to ipfs-cluster, output the cid as `steps.ipfs.outputs.cid`
# pin the built site to ipfs-websites cluster, output the cid as `steps.ipfs.outputs.cid`
# see: https://github.com/ipfs-shipyard/ipfs-github-action
- uses: ipfs-shipyard/ipfs-github-action@v2.0.0
id: ipfs
Expand All @@ -125,10 +123,18 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: echo ${{ steps.ipfs.outputs.url }}
- run: echo ${{ github.ref }}

# dev dnslink is updated on each main branch update
- run: npx dnslink-dnsimple --domain dev.webui.ipfs.io --link /ipfs/${{ steps.ipfs.outputs.cid }}
if: github.ref == 'refs/heads/main'
env:
DNSIMPLE_TOKEN: ${{ secrets.DNSIMPLE_TOKEN }}

# production dnslink is updated on release (during tag build)
- run: npx dnslink-dnsimple --domain webui.ipfs.io --link /ipfs/${{ steps.ipfs.outputs.cid }}
if: startsWith(github.ref, 'refs/tags/v')
env:
DNSIMPLE_TOKEN: ${{ secrets.DNSIMPLE_TOKEN }}
# TODO if: github.ref == 'refs/heads/master'

test-e2e:
name: 'test:e2e'
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/publish-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ jobs:
- name: Create archive
run: tar -czf ipfs-webui.tar.gz build/*

# TODO: ensure the CID in Release Notes match DNSLink AND attached archive
- name: Attach prebuilt archive to Release Notes
uses: skx/github-action-publish-binaries@c881a3f8ffb80b684f367660178d38ceabc065c2 #release-0.15
env:
Expand Down

0 comments on commit 0463d4b

Please sign in to comment.