Skip to content

Commit

Permalink
chore: switch to run only on main/release
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Mar 15, 2024
1 parent 9830520 commit dd91756
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/dnslink-smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,12 @@ on:
schedule:
- cron: '0 * * * *'
workflow_dispatch:
pull_request:
branches:
- '**'

env:
KUBO_VER: 'v0.27.0' # kubo daemon used for publishing to IPFS
CLUSTER_CTL_VER: 'v1.0.8' # ipfs-cluster-ctl used by publish-to-ipfs

jobs:
dnslink:
runs-on: ubuntu-latest
outputs:
link: ${{ steps.dnslink.link }}
dev: ${{ steps.dnslink.dev }}
steps:
- uses: ipfs/download-ipfs-distribution-action@v1
with:
name: kubo
version: "${{ env.KUBO_VER }}"
- uses: ipfs/start-ipfs-daemon-action@v1
- name: Read CID from DNSLink at inbrowser.link|dev
id: dnslink
run: |
echo "link=$(ipfs resolve /ipns/inbrowser.link | sed 's|^/ipfs/||')" >> $GITHUB_OUTPUT
echo "dev=$(ipfs resolve /ipns/inbrowser.dev | sed 's|^/ipfs/||')" >> $GITHUB_OUTPUT
smoke-test-cached-http: # basic smoke test that lets us know when stale-while-revalidate caching does not work on either env
runs-on: ubuntu-latest
strategy:
Expand All @@ -43,7 +23,6 @@ jobs:
run: curl --retry 3 --retry-delay 61 --retry-all-errors -v -L "https://${{ matrix.dnslink }}/ipfs-sw-main.js" > /dev/null

smoke-test-fresh-http: # basic smoke test for getting latest DNSLink DAG over HTTP gateways
needs: dnslink
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -68,7 +47,6 @@ jobs:
run: ipfs dag import --offline --pin-roots=true dag.car

smoke-test-fresh-p2p: # basic smoke test for getting latest DNSLink DAG over P2P with Kubo
needs: dnslink
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ jobs:
files: .coverage/*,packages/*/.coverage/*

publish-to-ipfs:
# NOTE: workflow_dispatch here allows maintainer to manually run against any branch, and it will produce a CAR with CID that is pinned
# TODO: if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'release' && github.event.action == 'published')
# NOTE: workflow_dispatch here allows maintainer to manually run against any branch, and it will produce a CAR with CID that is pinned to our cluster
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'release' && github.event.action == 'published')
needs: build
runs-on: ubuntu-latest
environment: Deploy # Clusteer secrets
Expand Down

0 comments on commit dd91756

Please sign in to comment.