diff --git a/.github/workflows/analyze-dependabot.yaml b/.github/workflows/analyze-dependabot.yaml new file mode 100644 index 00000000000..15891c70bd2 --- /dev/null +++ b/.github/workflows/analyze-dependabot.yaml @@ -0,0 +1,30 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +name: Dependabot Analyze PR + +on: + pull_request: + +permissions: { } + +jobs: + + analyze-dependabot: + # Skip this workflow on commits not pushed by Dependabot + if: ${{ github.actor == 'dependabot[bot]' }} + uses: apache/logging-parent/.github/workflows/analyze-dependabot-reusable.yaml@feat/dependabot-add-changelog2 diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e76d34669d8..80bad68e487 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -23,23 +23,25 @@ on: - "2.x" - "release/2*" pull_request: + workflow_dispatch: permissions: read-all jobs: build: - if: github.actor != 'dependabot[bot]' - uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/12.1.1 - secrets: - DV_ACCESS_TOKEN: ${{ startsWith(github.ref_name, 'release/') && '' || secrets.DEVELOCITY_ACCESS_KEY }} - with: - java-version: | - 8 - 17 - site-enabled: true - reproducibility-check-enabled: false - develocity-enabled: ${{ ! startsWith(github.ref_name, 'release/') }} + runs-on: ubuntu-latest + + steps: + - name: Just print some data + env: + ACTOR: ${{ github.actor }} + SENDER: ${{ toJSON(github.event.sender) }} + PR_USER: ${{ toJSON(github.event.pull_request.user) }} + run: | + echo "Actor: $ACTOR" + echo "Sender: $SENDER" + echo "User: $PR_USER" deploy-snapshot: needs: build diff --git a/.github/workflows/process-dependabot.yaml b/.github/workflows/process-dependabot.yaml new file mode 100644 index 00000000000..3477a2174e8 --- /dev/null +++ b/.github/workflows/process-dependabot.yaml @@ -0,0 +1,47 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +name: Dependabot Process PR + +on: + workflow_run: + workflows: + - "Dependabot Analyze PR" + types: + - completed + +permissions: { } + +jobs: + + process-dependabot: + # Skip this workflow on commits not pushed by Dependabot + if: ${{ github.actor == 'dependabot[bot]' }} + uses: apache/logging-parent/.github/workflows/process-dependabot-reusable.yaml@feat/dependabot-add-changelog2 + permissions: + # Required to auto-merge PRs + contents: write + pull-requests: write + secrets: + AUTO_MERGE_TOKEN: ${{ github.token }} + CONTENT_WRITE_TOKEN: ${{ secrets.USER_TOKEN }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} + with: + user-name: 'Release Manager' + user-email: bot@copernik.eu + analyze-workflow-run-id: ${{ github.event.workflow_run.id }}