Add: Actions Offline Mode #454

Open
TKaxv_7S wants to merge 4 commits from TKaxv_7S/offline_mode_support into main
TKaxv_7S commented 2023-12-20 14:32:40 +00:00 (Migrated from gitea.com)

In some regions, connecting to github.com may not be as smooth.

So every time we using uses: method, it is not a good way to fetch and pull the current action content, and I think the action tag will also be rarely updated.

We can add a configurable option in OfflineMode to control it, setting the default value to false, so this will not affect other users.

this pull code depend on act OfflineMode act pull #2128

In some regions, connecting to github.com may not be as smooth. So every time we using `uses:` method, it is not a good way to `fetch` and `pull` the current action content, and I think the action tag will also be rarely updated. We can add a configurable option in `OfflineMode` to control it, setting the default value to `false`, so this will not affect other users. this pull code depend on act `OfflineMode` [act pull #2128](https://github.com/nektos/act/pull/2128)
harryzcy commented 2024-02-17 19:19:23 +00:00 (Migrated from gitea.com)
Depend on https://gitea.com/gitea/act/pulls/90
silverwind commented 2024-05-30 15:35:36 +00:00 (Migrated from gitea.com)

Are there any downsides to enabling this by default? (https://gitea.com/gitea/act_runner/issues/556#issuecomment-824915 has some context)

It seems good to me to only pull action source only once per workflow instead of once per step.

Are there any downsides to enabling this by default? (https://gitea.com/gitea/act_runner/issues/556#issuecomment-824915 has some context) It seems good to me to only pull action source only once per workflow instead of once per step.
ChristopherHX commented 2024-06-03 23:31:36 +00:00 (Migrated from gitea.com)

It seems good to me to only pull action source only once per workflow

Yes the described behavior makes sense and would probably better than the current default

To be honest only "when not present" (action offline mode e.g. this pr adds a flag) and "always" (current / no flag to alter act) are implemented

Both are extrems

This means you might get less updates than you expect as every tag or branch or tag is downloaded exactly once in offline mode and that is not scoped to workflows or anthing else

> It seems good to me to only pull action source only once per workflow Yes the described behavior makes sense and would probably better than the current default To be honest only "when not present" (action offline mode e.g. this pr adds a flag) and "always" (current / no flag to alter act) are implemented Both are extrems This means you might get less updates than you expect as every tag or branch or tag is downloaded exactly once in offline mode and that is not scoped to workflows or anthing else
This pull request is broken due to missing fork information.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin TKaxv_7S/offline_mode_support:TKaxv_7S/offline_mode_support
git checkout TKaxv_7S/offline_mode_support
Sign in to join this conversation.