From dd91756c20b8eac28b35f5b2223a4165222594cb Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Fri, 15 Mar 2024 23:22:46 +0100 Subject: [PATCH] chore: switch to run only on main/release --- .github/workflows/dnslink-smoke-tests.yml | 22 ---------------------- .github/workflows/main.yml | 4 ++-- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/.github/workflows/dnslink-smoke-tests.yml b/.github/workflows/dnslink-smoke-tests.yml index 03dae35e..99d74cfb 100644 --- a/.github/workflows/dnslink-smoke-tests.yml +++ b/.github/workflows/dnslink-smoke-tests.yml @@ -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: @@ -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 @@ -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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e95b2e35..7e6c5b03 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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