diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 13f5cb4..96aab23 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,6 +29,9 @@ on: description: "Is this CI run from a public fork?" default: true type: boolean + run-tests: + default: true + type: boolean jobs: validate: @@ -102,7 +105,7 @@ jobs: test: needs: [validate] - if: ${{ ! needs.validate.outputs.is-draft }} + if: ${{ ! needs.validate.outputs.is-draft && inputs.run-tests }} runs-on: ubuntu-latest strategy: fail-fast: false diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c38e80..c27f431 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,26 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: CI +name: Validate Patch on: - push: - branches: - - 'trunk' - - '4.0' - - schedule: - - cron: '0 0 * * 6,0' # Run on Saturday and Sunday at midnight UTC - pull_request: types: [ opened, synchronize, ready_for_review, reopened ] - branches: - - 'trunk' - - '4.0' + branches: ["main"] merge_group: - types: - - checks_requested + types: [checks_requested] concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -47,7 +36,7 @@ jobs: with: fetch-depth: 0 - name: Display info - run: | + run: | pwd tree -a -I '.git' echo "Action: ${{ github.event.action }}" @@ -56,11 +45,11 @@ jobs: git log origin/main..HEAD - name: Validate files run: sleep 5 - build: uses: ./.github/workflows/build.yml with: is-trunk: ${{ github.ref == 'refs/heads/trunk' }} is-public-fork: ${{ github.event.pull_request.head.repo.fork || false }} + run-tests: false secrets: inherit diff --git a/.github/workflows/merge-queue.yml b/.github/workflows/merge-queue.yml deleted file mode 100644 index d43b5e4..0000000 --- a/.github/workflows/merge-queue.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Validate Patch - -on: - pull_request: - branches: [ "main" ] - merge_group: - types: [checks_requested] - -jobs: - validate-patch: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Display info - run: | - pwd - tree -a -I '.git' - echo "Action: ${{ github.event.action }}" - echo "Sender: ${{ github.event.sender.login }}" - git status - git log origin/main..HEAD - - name: Validate files - run: sleep 5