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

Cannot use this action more than once #2

Open
trystendsmyth opened this issue Dec 8, 2023 · 0 comments
Open

Cannot use this action more than once #2

trystendsmyth opened this issue Dec 8, 2023 · 0 comments

Comments

@trystendsmyth
Copy link

Symptoms

A single action works perfectly well:

- name: Reset foo branch from main
  uses: nicksnell/action-reset-repo@master
  with:
    base_branch: main
    reset_branch: foo
    github_token: ${{ secrets.GITHUB_TOKEN }}

However if we add another step that uses the same action, we get an error
mkdir: cannot create directory '_tmp': File exists

Cause

Your action needs to create a _tmp checkout folder. Unfortunately upon completion, any created files are not cleaned up. When the action runs again, it finds the previously created folder and fails.

Suggestion

  • Please add a cleanup step in your action to remove the _tmp directory
  • BONUS: update the action to compensate for an existing path, rather than fail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant