[GH-ISSUE #2219] Can't figure out how to reset image choice. #1047

Open
opened 2026-03-01 21:48:28 +03:00 by kerem · 14 comments
Owner

Originally created by @luketpeterson on GitHub (Feb 14, 2024).
Original GitHub issue: https://github.com/nektos/act/issues/2219

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.

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

Originally created by @luketpeterson on GitHub (Feb 14, 2024). Original GitHub issue: https://github.com/nektos/act/issues/2219 ### 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 ```yml n/a ``` ### Relevant log output ```sh [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_
Author
Owner

@luketpeterson commented on GitHub (Feb 14, 2024):

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?

<!-- gh-comment-id:1943106414 --> @luketpeterson commented on GitHub (Feb 14, 2024): 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?
Author
Owner

@ChristopherHX commented on GitHub (Feb 14, 2024):

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.

<!-- gh-comment-id:1943745024 --> @ChristopherHX commented on GitHub (Feb 14, 2024): 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.
Author
Owner

@mitchellnemitz commented on GitHub (Feb 14, 2024):

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.

<!-- gh-comment-id:1944451332 --> @mitchellnemitz commented on GitHub (Feb 14, 2024): 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.
Author
Owner

@kevinbluer commented on GitHub (Feb 16, 2024):

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!

<!-- gh-comment-id:1948798416 --> @kevinbluer commented on GitHub (Feb 16, 2024): > 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!
Author
Owner

@ubrmnsh commented on GitHub (Mar 12, 2024):

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

<!-- gh-comment-id:1991311613 --> @ubrmnsh commented on GitHub (Mar 12, 2024): for macOS deleting actrc at `/Users/[username]/Library/Application Support/act` gets the work done.
Author
Owner

@zburgermeiszter commented on GitHub (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.

<!-- gh-comment-id:2060949241 --> @zburgermeiszter commented on GitHub (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.
Author
Owner

@ubrmnsh commented on GitHub (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 :)

<!-- gh-comment-id:2061076292 --> @ubrmnsh commented on GitHub (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 :)
Author
Owner

@BinToss commented on GitHub (Apr 21, 2024):

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

<!-- gh-comment-id:2068015738 --> @BinToss commented on GitHub (Apr 21, 2024): I found `actrc` at `%LocalAppData%/act/actrc` on Windows
Author
Owner

@matthall3531 commented on GitHub (May 30, 2024):

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

<!-- gh-comment-id:2138750127 --> @matthall3531 commented on GitHub (May 30, 2024): I found `actrc` at `./.config/act/actrc` on Ubuntu.
Author
Owner

@sahilrajput03 commented on GitHub (Jun 20, 2024):

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.

<!-- gh-comment-id:2181120805 --> @sahilrajput03 commented on GitHub (Jun 20, 2024): > 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.
Author
Owner

@nick42d commented on GitHub (Jun 27, 2024):

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

<!-- gh-comment-id:2194382699 --> @nick42d commented on GitHub (Jun 27, 2024): Had the same issue here. Where is the source code for the book located?
Author
Owner

@dodinh commented on GitHub (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.

<!-- gh-comment-id:2194591850 --> @dodinh commented on GitHub (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`.
Author
Owner

@christhomas commented on GitHub (Jan 12, 2025):

If I can use a command line parameter to set these images, why can't I use another command line parameter to unset it, defaulting it back to whatever act uses before it's manually configured? Wouldn't that make more sense than needing to go digging through my filesystem to delete files like the actrc file?

Also, I think it's a better option to stick to using .dotfiles in the home directory, or better yet, the .config/act location as it mimics a lot of unix tools much better than putting things into macos specific locations where the configuration can't be easily found until you find a bug ticket like this one...

<!-- gh-comment-id:2585924677 --> @christhomas commented on GitHub (Jan 12, 2025): If I can use a command line parameter to set these images, why can't I use another command line parameter to unset it, defaulting it back to whatever act uses before it's manually configured? Wouldn't that make more sense than needing to go digging through my filesystem to delete files like the actrc file? Also, I think it's a better option to stick to using .dotfiles in the home directory, or better yet, the .config/act location as it mimics a lot of unix tools much better than putting things into macos specific locations where the configuration can't be easily found until you find a bug ticket like this one...
Author
Owner

@boompig commented on GitHub (Jun 17, 2025):

Is there any update on this issue? On Mac at least, the -P option seems to be overwritten if this file is present.

<!-- gh-comment-id:2981920504 --> @boompig commented on GitHub (Jun 17, 2025): Is there any update on this issue? On Mac at least, the `-P` option seems to be overwritten if this file is present.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#1047
No description provided.