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

Issue: actions/checkout doesn't copy git tracked but gitignored files #912

Closed
jsoref opened this issue Dec 2, 2021 · 10 comments · Fixed by #1074
Closed

Issue: actions/checkout doesn't copy git tracked but gitignored files #912

jsoref opened this issue Dec 2, 2021 · 10 comments · Fixed by #1074
Labels
kind/bug Something isn't working

Comments

@jsoref
Copy link
Contributor

jsoref commented Dec 2, 2021

The general behavior of .gitignore doesn't prevent files that are tracked from being checked out. It just prevents from from being updated or added.

I'd expect that act not copy over untracked files matched by .gitignore, but I'd expect it to include tracked files that are matched by .gitignore.

System information

  • Operating System: Linux & macOS
  • Architecture: x64
  • Apple M1: no
  • Docker version: on macOS: 20.10.8 (not sure about the version used by GHA)
  • Docker image used in act: catthehacker/ubuntu:act-latest
  • act version: 0.2.25

Expected behaviour

Files listed in .gitignore should be present in the checked out repository

Actual behaviour

Files listed in .gitignore are not present

Workflow and/or repository

jsoref/ignored@bfbee7f
https://github.com/jsoref/ignored/runs/4398686247?check_suite_focus=true

jsoref/ignored@5e20813
https://github.com/jsoref/ignored/runs/4398859601?check_suite_focus=true

Steps to reproduce

  1. Push jsoref/ignored@bfbee7f to a GitHub repo
  2. Check the action log
  3. Push jsoref/ignored@5e20813 to the GitHub repo
  4. Check the action log

act output

Log
[What do I have/Introspection] Skipping local actions/checkout because workdir was already copied
@jsoref jsoref added the kind/bug Something isn't working label Dec 2, 2021
@catthehacker
Copy link
Member

Have you tried --use-gitignore=false?

@jsoref
Copy link
Contributor Author

jsoref commented Dec 2, 2021

Yes, it would work, see the second commit/run.

But I shouldn't need to

@catthehacker
Copy link
Member

Right, we can't change behaviour because it will break functionality for other people

@jsoref
Copy link
Contributor Author

jsoref commented Dec 2, 2021

I see three possible behaviors:

  1. Copy all files
  2. Copy all files not matching .gitignore
  3. Copy all files except non tracked files matched by .gitignore

The current default is 2. The flag gets 1. I'm looking for 3.

The distinction between 2 and 3 is imo a bug, hence this bug.

@catthehacker catthehacker reopened this Dec 2, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2022

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

@github-actions github-actions bot added the stale label Jan 2, 2022
@jsoref
Copy link
Contributor Author

jsoref commented Jan 2, 2022

Please tag

jsoref added a commit to jsoref/act that referenced this issue Jan 2, 2022
jsoref added a commit to jsoref/act that referenced this issue Jan 2, 2022
@github-actions github-actions bot removed the stale label Jan 3, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2022

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

@github-actions github-actions bot added the stale label Feb 2, 2022
@jsoref
Copy link
Contributor Author

jsoref commented Feb 2, 2022

It's still a thing...

jsoref added a commit to jsoref/act that referenced this issue Feb 2, 2022
@github-actions github-actions bot removed the stale label Feb 3, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2022

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

@github-actions github-actions bot added the stale label Mar 6, 2022
@jsoref
Copy link
Contributor Author

jsoref commented Mar 6, 2022

It's still a thing...

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants