From 799c8ddf9f5e9d5f31cdad00f147cc17388dea63 Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Fri, 22 Sep 2023 22:02:47 +0100 Subject: [PATCH] ci: doc-build: add a rebase step Add a rebase step after checkout for the documentation build CI run. This is in line with what pretty much all other workfloww already do, and means that if a PR is opened on a broken tree and the breakage get fixed, the PR run just have to be retried for the test to pass and we don't have to ask the authors to rebase and lose any pending approvals. Signed-off-by: Fabio Baltieri --- .github/workflows/doc-build.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index 40e170ddc8a..351cb041a83 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -44,6 +44,20 @@ jobs: steps: - name: checkout uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + + - name: Rebase + continue-on-error: true + env: + BASE_REF: ${{ github.base_ref }} + PR_HEAD: ${{ github.event.pull_request.head.sha }} + run: | + git config --global user.email "actions@zephyrproject.org" + git config --global user.name "Github Actions" + git rebase origin/${BASE_REF} + git log --graph --oneline HEAD...${PR_HEAD} - name: install-pkgs run: |