Skip to content

Commit

Permalink
Merge branch 'main' into cwa/close-24-update-deps-hook
Browse files Browse the repository at this point in the history
  • Loading branch information
Treesarj committed May 15, 2023
2 parents e5a6834 + 3161d9c commit f323e21
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/_local_ci_automerge_dependency_prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
update-dependencies-branch:
name: Call reusable workflow
if: github.repository_owner == 'SINTEF' && startsWith(github.event.pull_request.head.ref, 'dependabot/') && github.actor == 'dependabot[bot]'
if: github.repository_owner == 'SINTEF' && ( ( startsWith(github.event.pull_request.head.ref, 'dependabot/') && github.actor == 'dependabot[bot]' ) || ( github.event.pull_request.head.ref == 'ci/update-pyproject' && github.actor == 'TEAM4-0' ) )
uses: ./.github/workflows/ci_automerge_prs.yml
secrets:
PAT: ${{ secrets.RELEASE_PAT }}
3 changes: 3 additions & 0 deletions docs/workflows/ci_automerge_prs.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ The motivation for being able to run changes prior to auto-merging, is to update
Usually auto-merging is activated for [dependabot](https://docs.github.com/en/code-security/dependabot) branches, i.e., when a dependency/requirement is updated.
Hence, the changes could include updating this dependency in documentation files or similar, where it will not be updated otherwise.

!!! note "PR branch name"
The generated branch for the PR will be named `ci/update-pyproject`.

## Expectations

The `PAT` secret must represent a user with the rights to activate auto-merging.
Expand Down
3 changes: 3 additions & 0 deletions docs/workflows/ci_update_dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ The main point of having this workflow is to have a single PR, which can be squa

As a "bonus" this workflow supports updating [pre-commit](https://pre-commit.com) hooks.

!!! note "PR branch name"
The generated branch for the PR will be named `ci/update-dependencies`.

!!! warning
If a PAT is not passed through for the `PAT` secret and `GITHUB_TOKEN` is used, beware that any other CI/CD jobs that run for, e.g., pull request events, may not run since `GITHUB_TOKEN`-generated PRs are designed to not start more workflows to avoid escalation.
Hence, if it is important to run CI/CD workflows for pull requests, consider passing a PAT as a secret to this workflow represented by the `PAT` secret.
Expand Down

0 comments on commit f323e21

Please sign in to comment.