checkout icon indicating copy to clipboard operation
checkout copied to clipboard

Option to not do post-job cleanup

Open Piedone opened this issue 2 years ago • 15 comments

The action does some cleanup in post-job (starting with the message "Post job cleanup."). I guess this is useful if the runner is reused, but I don't see the point of doing any cleanup on an ephemeral runner, that will be thrown away anyway. This is an issue because this cleanup can actually take significant time, like a minute, as you can also see in this run. This adds to the wait time of developers looking for build results, and to the bill paid for non-free runs.

So, it would be great to be able to turn this feature off.

I'm aware that the clean parameter exists, but that's for cleaning in the beginning, before fetching.

Piedone avatar Jan 30 '23 23:01 Piedone

I agree. I also have a use case where I need to debug the runner after execution and need the checked-out code to persist.

wlgrd avatar Feb 14 '23 10:02 wlgrd

Same here, i execute other cleanups before that and it will be weird to exclude only the files checked out in order to delete them later with this action.

peter-miroshnikov avatar Mar 09 '23 08:03 peter-miroshnikov

We're having the post-job cleanup cause occasional errors, so yes if it's possible to disable this it would be great

AdamJudge avatar Jun 28 '23 14:06 AdamJudge

I think this is essential, because I having an issue with post-job cleanup... Here is setup: Runner.yml

    steps:
      - name: Checkout action scheduler
        uses: actions/checkout@v3
      - name: Schedule automerge
        uses: ./.github/runner/auto_merge_runner  # The action.yml file is contained in this path of github actions running repo

actions.yml

  steps:
    - name: Checkout Working Repo
      uses: actions/checkout@v3
      with:
        repository: 'some/repository'
        ref: feature/github_action
        token: ${{ inputs.gh_token }}
     ...
     Working steps
     ...

And then, it works well on each process steps, but fails on "Post Schedule automerge" steps:

Error: Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under '/xxx/xxx/_work/xxx/xxx/.github/runner/auto_merge_runner

Because, it's already checked out to "some/repository", the actions.yml file can't be found which is on original github actions running repo. So I think it needs to reverse-checkout before doing post action, or just give options to disable post action

line-joonsoo avatar Aug 30 '23 09:08 line-joonsoo

I believe this will be an important feature to have for re-using workspace across jobs. If the build artifacts are of significant size and a regression has to be run on it we can use the same workspace.

snps-midhunn avatar Nov 07 '23 06:11 snps-midhunn

We also would like to have this feature, as our build artifacts are too large to be cached, and we want to use the build artifacts in the subsequent jobs.

snps-swamyt avatar Dec 12 '23 11:12 snps-swamyt

We would like to have this feature also. We use kota65535/github-openvpn-connect-action to create VPN connection. When the Post Connect to VPN is triggered, it causes the network to change (NETWORK CHANGED). Only way to control this is to Connect to VPN in earlier phase, that is "needed" --> to trigger the Post later

Kristiansmp avatar Dec 15 '23 08:12 Kristiansmp

Wild that this still hasn't been addressed 😕 Has anyone found a workaround?

langsmith avatar May 01 '24 19:05 langsmith