DiamondLightSource / python3-pip-skeleton

Archived in favour of https://github.com/DiamondLightSource/python-copier-template
Apache License 2.0
5 stars 5 forks source link

Bump peaceiris/actions-gh-pages from 3.8.0 to 3.9.0 #73

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 2 years ago

Bumps peaceiris/actions-gh-pages from 3.8.0 to 3.9.0.

Release notes

Sourced from peaceiris/actions-gh-pages's releases.

actions-github-pages v3.9.0

  • deps: bump node12 to node16
  • deps: bump @​actions/core from 1.6.0 to 1.10.0

See CHANGELOG.md for more details.

Changelog

Sourced from peaceiris/actions-gh-pages's changelog.

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

3.9.0 (2022-10-23)

chore

ci

... (truncated)

Commits


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
codecov[bot] commented 2 years ago

Codecov Report

Merging #73 (72bdba0) into main (323424f) will not change coverage. The diff coverage is n/a.

@@            Coverage Diff            @@
##              main       #73   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines           16        16           
=========================================
  Hits            16        16           

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

gilesknap commented 2 years ago

This appears to have broken with permissions issue. Has the action changed the way it does the push to git?

garryod commented 2 years ago

This appears to have broken with permissions issue. Has the action changed the way it does the push to git?

Hi Giles,

The issue is not with the action itself but rather the permissions given to dependabot. Dependabot PRs are treated like PRs from forks and aren't given access to workflow secrets. See: https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/

coretl commented 2 years ago

That's annoying, we need to exclude dependabot PRs in this statement then: https://github.com/DiamondLightSource/python3-pip-skeleton/blob/main/.github/workflows/docs.yml#L54

coretl commented 2 years ago

Is there a ${{ github.is_dependabot }} or something similar?

coretl commented 2 years ago

https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#responding-to-events

github.actor == 'dependabot[bot]'

garryod commented 2 years ago

There are three options,

  1. Elevate the permissions of the action with:

    jobs:
     docs:
       permissions:
         contents: write

    This opens up the possibility of a malicious change to one of the actions within ruining our repo, so I would recommend against this.

  2. Skip if the the user is dependabot. This should work for now but will not solve the issue when it comes to forked PRs.

  3. Skip if the user doesn't have write permission. (using an action like: https://github.com/marketplace/actions/check-user-permission). It's a bit more work, but the most "correct" solution

coretl commented 2 years ago

I vote for 2. The likelihood of dependabot updating something that subtly reformats the docs and someone spotting it are slim, so no point in pushing gh-pages anyway

gilesknap commented 2 years ago

With 2. if we have a legitimate user with incorrect permissions it will fail silently and cause confusion. I'm not sure how likely that is but I also find Tom's "if github.actor == 'dependabot[bot]'" more explicitly describes what we are doing.

EDIT: Ah OK forked PRs are still an issue so @garryod is right

gilesknap commented 1 year ago

I think I took too much acid before my previous post on this. Please ignore.

I've gone with 2. and bumped the actions-gh-pages manually in #79

dependabot[bot] commented 1 year ago

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.