From b6694fc5ffa710412d850287c426748b48ddeb5e Mon Sep 17 00:00:00 2001 From: Alexander Samusev <41779041+alvicsam@users.noreply.github.com> Date: Tue, 27 Aug 2024 19:07:03 +0200 Subject: [PATCH] rm mq-gha (#4) * rm mq-gha * fix var * add outputs * reduce time * add condition * rm env --- .github/workflows/gha-pass.yml | 2 +- .github/workflows/gha.yml | 25 ++++++++++++++++++++++--- .github/workflows/mq-gha.yml | 22 ---------------------- 3 files changed, 23 insertions(+), 26 deletions(-) delete mode 100644 .github/workflows/mq-gha.yml diff --git a/.github/workflows/gha-pass.yml b/.github/workflows/gha-pass.yml index bbcf253..bdb484d 100644 --- a/.github/workflows/gha-pass.yml +++ b/.github/workflows/gha-pass.yml @@ -19,4 +19,4 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: sleep 180 + - run: sleep 30 diff --git a/.github/workflows/gha.yml b/.github/workflows/gha.yml index de31581..62a4bca 100644 --- a/.github/workflows/gha.yml +++ b/.github/workflows/gha.yml @@ -6,6 +6,7 @@ on: - main pull_request: types: [opened, synchronize, reopened, ready_for_review, labeled] + merge_group: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -14,13 +15,31 @@ concurrency: permissions: {} jobs: + set-runner: + runs-on: ubuntu-latest + outputs: + RUNNER: ${{ steps.set-runner.outputs.RUNNER }} + steps: + - name: set runner + id: set-runner + run: | + echo "hello world" + echo "RUNNER=arc-runners-default-stg" >> $GITHUB_OUTPUT + # Run merge queues on persistent runners + if [[ $GITHUB_REF_NAME == *"gh-readonly-queue"* ]]; then + echo "RUNNER=ubuntu-latest" >> $GITHUB_OUTPUT + else + echo "RUNNER=arc-runners-default-stg" >> $GITHUB_OUTPUT + fi + test-job: - runs-on: arc-runners-default-stg + needs: [set-runner] + runs-on: ${{ needs.set-runner.outputs.RUNNER }} steps: - uses: actions/checkout@v4 - - run: sleep 60 + - run: sleep 10 test-job2: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: sleep 120 + - run: sleep 10 diff --git a/.github/workflows/mq-gha.yml b/.github/workflows/mq-gha.yml deleted file mode 100644 index 1a7d1dd..0000000 --- a/.github/workflows/mq-gha.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Merge queue github action - -on: - merge_group: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -permissions: {} - -jobs: - test-job: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - run: sleep 5 - test-job2: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - run: sleep 5