Skip to content

Commit

Permalink
Configure action timeouts and artifact retention duration
Browse files Browse the repository at this point in the history
  • Loading branch information
mbeckem committed Dec 1, 2023
1 parent 317e892 commit 3457895
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/audit-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
jobs:
audit-dependencies:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/test-and-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -47,19 +51,21 @@ 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"
uses: "./.github/workflows/version.yml"
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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
version:
runs-on: ubuntu-latest
permissions: write-all
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down

0 comments on commit 3457895

Please sign in to comment.