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

Suggestion: Add support for third-party PPA #74

Open
fambon opened this issue Dec 1, 2022 · 7 comments
Open

Suggestion: Add support for third-party PPA #74

fambon opened this issue Dec 1, 2022 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@fambon
Copy link

fambon commented Dec 1, 2022

It would be cool to be able to specify third-party PPAs as package sources in addition to the default sources.

Use case: installing (and caching) the chromium package (not the official snap one, some plain .deb)

This use-case requires:

  • sudo add-apt-repository ppa:<some ramdom ppa repo>
  • sudo apt update
  • sudo apt install chromium-browser

I guess that simply providing an additional "with" parameter add-repository: <repository> would be enough
and the action would then issue the relevant pre-flight commands cf above prior to the apt install

@fambon
Copy link
Author

fambon commented Dec 2, 2022

Eventually, I added a step to my workflow, just before the apt-cache action :-)
that step simply adds the ppa, and all goes fine:
installed package is that of the ppa, and cached.

    steps:
      - uses: actions/checkout@v1
      - run:|
          sudo add-apt-repository ppa:saiarcot895/chromium-beta
          sudo apt-get update
      - uses: awalsh128/cache-apt-pkgs-action@latest
        with:
          packages: chromium-chromedriver postgresql postgresql-contrib
          version: 1.0

      - run: make tests
        [...]

@fambon fambon closed this as completed Dec 2, 2022
@awalsh128
Copy link
Owner

This is an interesting case. It would be relatively simple to add and may be more intuitive. WDYT?

@fambon
Copy link
Author

fambon commented Dec 7, 2022

Well, if the action provides for the extra parameter/commands, sure, it's easier on the user's side :-)

I closed the issue because I though that adding the extra step in the workflow was the «expected» way to do it, considering it's pretty simple to do, once you figure it out, but we can re-open if you think the feature is worth adding.

@awalsh128 awalsh128 added the enhancement New feature or request label Dec 8, 2022
@awalsh128 awalsh128 reopened this Dec 8, 2022
@awalsh128
Copy link
Owner

@fambon I started work on this and was curious what you thought about this. I could support just PPA or other repos in general; it is just more verbose.

For example:

    apt-add-repository 'deb http://myserver/path/to/repo stable myrepo'
    apt-add-repository 'http://myserver/path/to/repo myrepo'
    apt-add-repository 'https://packages.medibuntu.org free non-free'
    apt-add-repository http://extras.ubuntu.com/ubuntu
    apt-add-repository ppa:user/repository
    apt-add-repository ppa:user/distro/repository
    apt-add-repository multiverse

Would it make sense to support more than just PPA?

@fambon
Copy link
Author

fambon commented Dec 29, 2022

seems to call for the general form 👍

@mstruebing
Copy link

Do you need support finishing this feature? Would love to use this 👍

@awalsh128
Copy link
Owner

Support is always welcome. 💯

Happy to look at any PRs. Make sure to PR from dev branch and add a corresponding test in https://github.com/awalsh128/cache-apt-pkgs-action-ci. We can then add the staging and prod tests as we graduate through those branches.

Master is broken right now too, so that will need to get fixed before we pull from staging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants