Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actions used from composite actions are not bumped by dependabot #6704

Open
1 task done
alex opened this issue Feb 21, 2023 · 11 comments
Open
1 task done

Actions used from composite actions are not bumped by dependabot #6704

alex opened this issue Feb 21, 2023 · 11 comments
Labels
L: github:actions GitHub Actions T: feature-request Requests for new features

Comments

@alex
Copy link

alex commented Feb 21, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Package ecosystem

github actions

Package manager version

No response

Language version

No response

Manifest location and content before the Dependabot update

No response

dependabot.yml content

version: 2
updates:
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "daily"
    open-pull-requests-limit: 1024

  - package-ecosystem: cargo
    directory: "/src/rust/"
    schedule:
      interval: daily
    allow:
      # Also update indirect dependencies
      - dependency-type: all
    open-pull-requests-limit: 1024

  - package-ecosystem: pip
    directory: "/"
    schedule:
      interval: daily
    open-pull-requests-limit: 1024

Updated dependency

actions/cache

What you expected to see, versus what you actually saw

I expect https://github.com/pyca/cryptography/blob/main/.github/actions/cache/action.yml#L33 to be upgraded by pyca/cryptography#8365, but it's not.

Native package manager behavior

No response

Images of the diff or a link to the PR, issue, or logs

No response

Smallest manifest that reproduces the issue

No response

@alex alex added the T: bug 🐞 Something isn't working label Feb 21, 2023
@deivid-rodriguez deivid-rodriguez added the L: github:actions GitHub Actions label Feb 21, 2023
@deivid-rodriguez
Copy link
Contributor

Yeah, I can reproduce this. Currently the only way to update composite actions is to configure the directory containing the action.yml file explicitly.

But even if not explicitly configured, we should also parse any local actions referenced by any parsed workflow files, so that you can get all updates for a specific dependency together like you expected.

@alex
Copy link
Author

alex commented Feb 21, 2023

@deivid-rodriguez thanks! when you say to configure the directory with the action.yml, you mean one entry per composite action, is that right?

@deivid-rodriguez
Copy link
Contributor

Yes, that's what I mean.

@Drowze
Copy link

Drowze commented Oct 26, 2023

As I understand (I also bumped into this problem), there's no "standard directory" for defining internal actions (I don't think .github/actions/ is standard), and therefore dependabot simply does not assume your actions path. I really don't think this is a bug 🤔 (is it labeled as bug incorrectly? @deivid-rodriguez)

I also have a similar issue with a private GitHub repo hosting multiple actions at e.g.:

/.github/dependabot.yml
/.github/workflows/my-shared-workflow.yml
/action-foo/action.yml
/action-bar/action.yml
... # and a dozen of other actions

With that repository and dependabot configured with github-actions and directory: "/", what I would like to see is Dependabot looking for all valid action.yml files and updating those, on top of updating the actions within my-shared-workflow.yml

But currently instead what happens is that dependabot will only search for updates within my-shared-workflow.yml.

Realistically I don't think dependabot will ever sweep the whole repo for valid GH Actions files, but instead I expect one of these issues being fixed (so we can have simplify our dependabot config when it has multiple directories with the same ecosystem): #2178 #1582

@alex
Copy link
Author

alex commented Oct 26, 2023

I believe it's correct that there's no standard directory for internal actions, however, nonetheless they could be discovered by recursively following local uses: from a workflow.

@deivid-rodriguez
Copy link
Contributor

I can label as a feature request, probably a better fit! My intention to support this was to do what @alex suggests, since that's what we already do in similar situations.

@deivid-rodriguez deivid-rodriguez added T: feature-request Requests for new features and removed T: bug 🐞 Something isn't working labels Oct 27, 2023
copybara-service bot pushed a commit to google-deepmind/concordia that referenced this issue Jan 2, 2024
dependabot/dependabot-core#6704

PiperOrigin-RevId: 595066288
Change-Id: I41ed288918a55c3b9c2ebc901ab201db5781a072
copybara-service bot pushed a commit to google-deepmind/meltingpot that referenced this issue Jan 2, 2024
dependabot/dependabot-core#6704

PiperOrigin-RevId: 595066288
Change-Id: I8a721aba6b163875b1bb2bd227f589d59a4567a2
colinrotherham added a commit to alphagov/govuk-frontend that referenced this issue Jan 23, 2024
@carlincherry
Copy link
Member

Hi! Can you try using multi-directory support and grouping rules? That should work to update composite actions. cc @abdulapopoola

@abdulapopoola abdulapopoola moved this from Planned to In Progress in Dependabot May 3, 2024
@alex
Copy link
Author

alex commented May 3, 2024

Thanks! pyca/cryptography#10921 this definitely makes it less verbose. Once there are wildcards we'll be able to do .github/actions/* I assume, at which point I think this will be sufficient for us.

@king-of-poppk
Copy link

Yes, that's what I mean.

@deivid-rodriguez Can you provide an example configuration for an action located at .github/actions/abc/action.yml?

@deivid-rodriguez
Copy link
Contributor

I no longer maintain this repo, but you can see a few linked commit and PRs with the current workaround.

@mrmckeb
Copy link

mrmckeb commented Nov 26, 2024

@carlincherry, are you able to give an example of how the multi-directory would look here? Would it be the below?

version: 2
updates:
  - package-ecosystem: "github-actions"
    directories:
      - "/"
      - "/.github/actions/*/action.yaml"
    schedule:
      interval: "daily"

There isn't a standard, but like many users we use .github/actions/[name] - which means the action.yaml file is at .github/actions/[name]/action.yaml.

I'm concerned that Dependabot may still be looking for a .github/workflows folder with this approach, and it's a little hard to test.

iusmac added a commit to iusmac/7SIM that referenced this issue Dec 6, 2024
Dependabot completely ignored composite actions since they doesn't
follow the conventional directory structure for storing .yml files.

As a workaround, we have to explicitly instruct Dependabot to scan the
directory with .yml files.

Ref: dependabot/dependabot-core#6704

Signed-off-by: iusmac <[email protected]>
@abdulapopoola abdulapopoola moved this from In Progress to Scoping in Dependabot Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: github:actions GitHub Actions T: feature-request Requests for new features
Projects
Status: Scoping
Development

No branches or pull requests

8 participants
@alex @abdulapopoola @deivid-rodriguez @mrmckeb @Drowze @carlincherry @king-of-poppk and others