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

Have to delete action container in order to run new changes #715

Closed
20k-ultra opened this issue Jun 1, 2021 · 4 comments · Fixed by #878
Closed

Have to delete action container in order to run new changes #715

20k-ultra opened this issue Jun 1, 2021 · 4 comments · Fixed by #878
Assignees
Labels
kind/bug Something isn't working stale-exempt Exempt from stale

Comments

@20k-ultra
Copy link

I'm unable to find any flag or mention of making act rebuild the action image. I am forced to delete the image which is very time consuming and misses out on layer caching.

Is there a way to tell act to run my action and build the image every time ?

@20k-ultra 20k-ultra added the kind/bug Something isn't working label Jun 1, 2021
@catthehacker
Copy link
Member

Currently there isn't

@catthehacker catthehacker self-assigned this Jun 13, 2021
@github-actions
Copy link
Contributor

Issue is stale and will be closed in 14 days unless there is new activity

@github-actions github-actions bot added the stale label Jul 14, 2021
@catthehacker catthehacker added stale-exempt Exempt from stale and removed stale labels Jul 14, 2021
@josecelano
Copy link

josecelano commented Nov 8, 2021

act generates the docker image with a command like this:

docker build -t act-github-actions-your-action:latest --platform  /home/your-repo/.github/actions/your-action

I used to delete the image before running the job with:

docker image rm act-github-actions-your-action

That forces the docker to re-build the docker image. It worked for me but for some reason, it's not working anymore.

@20k-ultra
Copy link
Author

20k-ultra commented Nov 9, 2021

I forgot to include some context that I think is important...I'm using act to actually develop an action not workflow. I think act is intended for action users to test their workflow which explains why you don't have a way to rebuild the docker image everytime.

So to be clear, I am working on an action which is a docker container that I was using act to then trigger. I'm doing this because Github does not offer any other sane way of developing actions that I know of. Since act couldn't rebuild the container I just made a npm run command to load some env vars from a env file which allowed the octokit module to be populated with the context and webhook data just like when running it via act/github.com.

I would be interested to see how I can use act though so I don't have to maintain the event payloads and env vars!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working stale-exempt Exempt from stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants