diff --git a/.github/workflows/audit-dependencies.yml b/.github/workflows/audit-dependencies.yml index c80354dc..87e9e5bf 100644 --- a/.github/workflows/audit-dependencies.yml +++ b/.github/workflows/audit-dependencies.yml @@ -9,6 +9,7 @@ on: jobs: audit-dependencies: runs-on: ubuntu-latest + timeout-minutes: 5 steps: - name: Checkout uses: actions/checkout@v3 diff --git a/.github/workflows/test-and-build.yml b/.github/workflows/test-and-build.yml index 19e01137..9d370c86 100644 --- a/.github/workflows/test-and-build.yml +++ b/.github/workflows/test-and-build.yml @@ -5,7 +5,11 @@ on: pull_request: jobs: test: + # Don't run for pull requests from this repository to avoid duplicate builds (push also triggers build). + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name + name: "Test and Build" runs-on: ubuntu-latest + timeout-minutes: 15 permissions: contents: write steps: @@ -47,7 +51,8 @@ jobs: with: name: build path: dist/ - + retention-days: ${{ github.ref == 'refs/heads/main' && 7 || 1 }} + call_version: if: github.ref == 'refs/heads/main' name: "Publish or create version PR" @@ -55,11 +60,12 @@ jobs: needs: test secrets: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - + deploy: + if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest + timeout-minutes: 5 needs: test - if: github.ref == 'refs/heads/main' steps: - name: Checkout uses: actions/checkout@v3 diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml index 841e4538..ab057e72 100644 --- a/.github/workflows/version.yml +++ b/.github/workflows/version.yml @@ -10,6 +10,7 @@ jobs: version: runs-on: ubuntu-latest permissions: write-all + timeout-minutes: 15 steps: - name: Checkout uses: actions/checkout@v3