[go: up one dir, main page]

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

Can't figure out how to reset image choice. #2219

Open
luketpeterson opened this issue Feb 14, 2024 · 12 comments
Open

Can't figure out how to reset image choice. #2219

luketpeterson opened this issue Feb 14, 2024 · 12 comments
Labels
confirmed/not-planned Those issues are confirmed, but not planned to be fixed. PR's get reviewed kind/bug Something isn't working

Comments

@luketpeterson
Copy link
luketpeterson commented Feb 14, 2024

Bug report info

When I first ran act, I selected the "Medium" image. That failed because it couldn't find a satisfactory Python. So I figured I'd try a "Large" image. But I can't figure out how to reset that preference.

Things I've tried:

invoking act with act -P image=catthehacker/ubuntu:full-22.04 seems to pull the medium images anyway.

[build docs/deploy] 🚀  Start image=catthehacker/ubuntu:act-latest
[minimal/run      ] 🚀  Start image=catthehacker/ubuntu:act-20.04
[ci/common/run] 🚀  Start image=catthehacker/ubuntu:act-20.04

I've tried deleting the medium images from docker, but it just re-pulls them without asking again.

I've tried deleting everything I could find associated with act on the hope that it would ask again when I reinstalled it, but that preference is still hiding somewhere...



### Command used with act

```sh
`act -P image=catthehacker/ubuntu:full-22.04`

Describe issue

I've spent 30 minutes reading documentation, forums, and reinstalling stuff trying to get back to the "What size image do you want to use?" prompt that it asked me when I first installed act.

Link to GitHub repository

No response

Workflow content

n/a

Relevant log output

[build docs/deploy] 🚀  Start image=catthehacker/ubuntu:act-latest
[minimal/run      ] 🚀  Start image=catthehacker/ubuntu:act-20.04
[ci/common/run] 🚀  Start image=catthehacker/ubuntu:act-20.04

Additional information

No response

@luketpeterson luketpeterson added the kind/bug Something isn't working label Feb 14, 2024
@luketpeterson
Copy link
Author

I think it does what I want when I manually specify each image in the invocation. ie

act -P ubuntu-22.04=catthehacker/ubuntu:full-22.04 -P ubuntu-latest=catthehacker/ubuntu:full-latest -P ubuntu-20.04=catthehacker/ubuntu:full-20.04

Is there a way to make this the default?

@ChristopherHX
Copy link
Contributor

There are multiple locations where you can change default cli flags, a good point would be to add it to the act userguide

  • ./.actrc For project specfic settings
  • ~/.actrc For global settings (default location of old versions of act, ~ is your userprofile/home folder)
  • %localappdata%/act/actrc (Windows, Don't remember 100%ly)
  • ~/Library/Preferences/act/actrc (macOS, A guess, not tested yet)
  • ~/.config/act/actrc (macOS, A guess, not tested yet)
    More here https://github.com/adrg/xdg config path subpath is act/actrc

The content for your preference would be added to a actrc file like

-P ubuntu-22.04=catthehacker/ubuntu:full-22.04
-P ubuntu-latest=catthehacker/ubuntu:full-latest
-P ubuntu-20.04=catthehacker/ubuntu:full-20.04

The format of this file is just -flag + + argument + newline (don't use any kind of quotes)

We should really make act log all actrc locations if not already.

If you would provide act -P image=catthehacker/ubuntu:full-22.04 -v then you might even see which actrc is loaded in the log, delete it to get the survey again.

@mitchellnemitz
Copy link

On macOS, the config I selected on first run seems to have been saved to ~/Library/Application Support/act/actrc which I was able to identify from perusing the base directories here: https://github.com/adrg/xdg?tab=readme-ov-file#xdg-base-directory

However, this took me a long time to find, as the output of act after selecting an option includes a dead link and only mentions ~/.actrc and nothing about XDG directory structures:

Default image and other options can be changed manually in ~/.actrc (please refer to https://github.com/nektos/act#configuration for additional information about file structure)

If I can get things up and running I'll try to submit a PR to update the documentation.

@kevinbluer
Copy link

On macOS, the config I selected on first run seems to have been saved to ~/Library/Application Support/act/actrc

Thanks @mitchellnemitz, I'd been digging around for it with no luck!

@luketpeterson luketpeterson changed the title Can't figure out how to reset image choice. Seems to ignore -P option. Can't figure out how to reset image choice. Feb 17, 2024
@ubrmnsh
Copy link
ubrmnsh commented Mar 12, 2024

for macOS deleting actrc at /Users/[username]/Library/Application Support/act gets the work done.

@zburgermeiszter
Copy link

for macOS deleting actrc at /Users/[username]/Library/Application Support/act gets the work done.

It worked thanks.
It would be great to have a setting command for changing this.

@ubrmnsh
Copy link
ubrmnsh commented Apr 17, 2024

for macOS deleting actrc at /Users/[username]/Library/Application Support/act gets the work done.

It worked thanks. It would be great to have a setting command for changing this.

i'll try to raise a pr, you can also if you want to :)

@BinToss
Copy link
BinToss commented Apr 21, 2024

I found actrc at %LocalAppData%/act/actrc on Windows

@matthall3531
Copy link

I found actrc at ./.config/act/actrc on Ubuntu.

@sahilrajput03
Copy link

for macOS deleting actrc at /Users/[username]/Library/Application Support/act gets the work done.

rm /Users/$USER/Library/Application\ Support/act/actrc

Using environment variable also work like that.

@nick42d
Copy link
nick42d commented Jun 27, 2024

Had the same issue here. Where is the source code for the book located?

@dodinh
Copy link
dodinh commented Jun 27, 2024

If - like me - you're running act as sudo (because docker needs sudo on my system), the file to remove/edit is /root/.config/act/actrc.

@ChristopherHX ChristopherHX added the confirmed/not-planned Those issues are confirmed, but not planned to be fixed. PR's get reviewed label Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed/not-planned Those issues are confirmed, but not planned to be fixed. PR's get reviewed kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests