diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4dc3bb322..d88dea478 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -67,10 +67,16 @@ jobs: path: dist/ if-no-files-found: error - generate-docs-pr: - if: github.event_name == 'pull_request' + test-generate-docs: + # This could be github.event_name != 'push', but that's not being triggered + # for merge_group for some reason + if: github.event_name == 'pull_request' || github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch' runs-on: ubuntu-20.04 steps: + - name: DEBUG INFO + env: + GITHUB_EVENT_NAME: ${{ github.event_name }} + run: echo $GITHUB_EVENT_NAME - name: Fetch sources uses: actions/checkout@v3 @@ -89,7 +95,7 @@ jobs: - name: Generate the documentation env: - MIKE_VERSION: pr-${{ github.event.number }} + MIKE_VERSION: gh-${{ github.job }} run: | mike deploy $MIKE_VERSION mike set-default $MIKE_VERSION @@ -103,7 +109,8 @@ jobs: publish-docs: needs: ["test", "build-dist"] - if: github.event_name == 'push' + # We shouldn't need the reference name here, but `merge_group` is being executed as if it was `push` + if: github.event_name == 'push' && (github.ref == 'refs/heads/v0.x.x' || startsWith(github.ref, 'refs/tags/')) runs-on: ubuntu-20.04 permissions: contents: write @@ -180,7 +187,7 @@ jobs: create-github-release: needs: ["publish-docs"] # Create a release only on tags creation - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') permissions: # We need write permissions on contents to create GitHub releases and on # discussions to create the release announcement in the discussion forums diff --git a/.github/workflows/dco-merge-queue.yml b/.github/workflows/dco-merge-queue.yml new file mode 100644 index 000000000..fb1cd90c7 --- /dev/null +++ b/.github/workflows/dco-merge-queue.yml @@ -0,0 +1,11 @@ +# Based on https://github.com/hyperledger/besu/pull/5207/files +name: DCO +on: + merge_group: + +jobs: + DCO: + runs-on: ubuntu-latest + if: ${{ github.actor != 'dependabot[bot]' }} + steps: + - run: echo "This DCO job runs on merge_queue event and doesn't check PR contents"