diff --git a/.github/workflows/dead-code.yml b/.github/workflows/dead-code.yml index 75a5798..39d1aa5 100644 --- a/.github/workflows/dead-code.yml +++ b/.github/workflows/dead-code.yml @@ -2,6 +2,8 @@ name: Dead code # Managed by CodexSkills bootstrap-code-quality.py on: pull_request: + push: + branches: [main] permissions: contents: read jobs: @@ -14,4 +16,4 @@ jobs: - uses: astral-sh/setup-uv@v7 - run: bash scripts/check-dead-code.sh env: - QUALITY_BASE_REF: origin/${{ github.base_ref }} + QUALITY_BASE_REF: ${{ github.event_name == 'pull_request' && format('origin/{0}', github.base_ref) || github.event.before != '0000000000000000000000000000000000000000' && github.event.before || '' }} diff --git a/.github/workflows/product-validation.yml b/.github/workflows/product-validation.yml index e375bec..fca2645 100644 --- a/.github/workflows/product-validation.yml +++ b/.github/workflows/product-validation.yml @@ -1,5 +1,8 @@ name: Product validation -on: [pull_request] +on: + pull_request: + push: + branches: [main] permissions: contents: read jobs: @@ -8,13 +11,13 @@ jobs: steps: - uses: actions/checkout@v7 with: - ref: ${{ github.event.pull_request.head.sha }} + ref: ${{ github.event.pull_request.head.sha || github.sha }} - uses: astral-sh/setup-uv@v7 - run: uv sync --locked - run: uv run --locked python scripts/validate.py - uses: actions/upload-artifact@v7 if: always() with: - name: simbrief-validation-${{ github.event.pull_request.head.sha }} + name: simbrief-validation-${{ github.event.pull_request.head.sha || github.sha }} path: artifacts/validation/ if-no-files-found: error