From 5a72d61bcc5ec3b01dc214bac7a7406bf6fe50ba Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Wed, 8 Nov 2023 12:53:00 +0100 Subject: [PATCH 1/4] ci: testing workflows --- .github/workflows/reftest.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/reftest.yml diff --git a/.github/workflows/reftest.yml b/.github/workflows/reftest.yml new file mode 100644 index 0000000000000..815b1f8601df5 --- /dev/null +++ b/.github/workflows/reftest.yml @@ -0,0 +1,16 @@ +name: ref-print +on: + pull_request: + merge_group: + +jobs: + ref-print: + runs-on: ubuntu-latest + steps: + - name: github.base_ref + run: echo github.base_ref=${{ github.base_ref }} + - name: github.merge_group.base_ref + run: echo github.event.merge_group.base_ref=${{ github.event.merge_group.base_ref }} + - name: fail-if + if: github.event_name != 'merge_group' + run: "false" From c5a43c6fcdbbf136bfbd8b59f784784e12613d68 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Wed, 8 Nov 2023 12:56:32 +0100 Subject: [PATCH 2/4] fixup! ci: testing workflows --- .github/workflows/reftest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reftest.yml b/.github/workflows/reftest.yml index 815b1f8601df5..fc204e5728cb9 100644 --- a/.github/workflows/reftest.yml +++ b/.github/workflows/reftest.yml @@ -12,5 +12,5 @@ jobs: - name: github.merge_group.base_ref run: echo github.event.merge_group.base_ref=${{ github.event.merge_group.base_ref }} - name: fail-if - if: github.event_name != 'merge_group' + if: github.event_name == 'merge_group' run: "false" From 40d2f4ad158ec2a44d38d89f5fed1c2198222b2f Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Wed, 8 Nov 2023 12:57:36 +0100 Subject: [PATCH 3/4] REMOVEME: test commit --- .github/workflows/check-commits.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check-commits.yml b/.github/workflows/check-commits.yml index c4d15bacf70a6..fb33c3af742f3 100644 --- a/.github/workflows/check-commits.yml +++ b/.github/workflows/check-commits.yml @@ -27,9 +27,9 @@ jobs: run: | ./dist/tools/${{ matrix.check }}/check.sh "${{ github.base_ref }}" check-commits-success: - needs: check-commits - if: github.event_name != 'merge_group' + # needs: check-commits runs-on: ubuntu-latest steps: - name: check-commits succeeded - run: exit 0 + if: github.event_name == 'merge_group' + run: exit 1 From 0b1a3e469975a840144c40467199d017e0440573 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Wed, 8 Nov 2023 13:12:20 +0100 Subject: [PATCH 4/4] fixup! fixup! ci: testing workflows --- .github/workflows/reftest.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/reftest.yml b/.github/workflows/reftest.yml index fc204e5728cb9..c80516db49aa0 100644 --- a/.github/workflows/reftest.yml +++ b/.github/workflows/reftest.yml @@ -7,10 +7,16 @@ jobs: ref-print: runs-on: ubuntu-latest steps: - - name: github.base_ref - run: echo github.base_ref=${{ github.base_ref }} - - name: github.merge_group.base_ref - run: echo github.event.merge_group.base_ref=${{ github.event.merge_group.base_ref }} + - name: set CI_BASE_BRANCH + run: | + if [ -n "${{ github.base_ref }}" ]; then + echo "CI_BASE_BRANCH=${{ github.base_ref }}" >> $GITHUB_ENV + elif [ -n "${{ github.event.merge_group.base_ref }}" ]; then + echo "CI_BASE_BRANCH=${{ github.event.merge_group.base_ref }}" | sed s.=refs/heads/.=. >> $GITHUB_ENV + fi + + - name: echo CI_BASE_BRANCH + run: echo CI_BASE_BRANCH=$CI_BASE_BRANCH - name: fail-if if: github.event_name == 'merge_group' run: "false"