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

File push to same repo under main branch #5

Open
jairamjidgekar opened this issue Jul 28, 2022 · 5 comments
Open

File push to same repo under main branch #5

jairamjidgekar opened this issue Jul 28, 2022 · 5 comments

Comments

@jairamjidgekar
Copy link

Hi,

I have a simple python script which creates a dummy file with some content.
When I am running the workflow, I am able to see that the file is created and I am reading the contents of the file as well.

But after the wf is completed, the file is nowhere seen.

Can you please help?
Below is my .yml code:

name: Python Test File Placement

on:

pull_request:
branches: [ "main" ]

workflow_dispatch:

jobs:

build:

runs-on: ubuntu-latest


steps:

  - uses: actions/checkout@v3


  - name: Python Script Execution
    run: python read_lines.py
  - name: Commiting files
    run: git add data_load/New_Test_File.txt
         git commit -m "commit message"
         git push
@cpina
Copy link
Owner

cpina commented Jul 28, 2022

Could you add a link to the output of the GitHub Action?
Or to the repository where you are trying this?
I might be able to see what's wrong :-)

@jairamjidgekar
Copy link
Author

@jairamjidgekar
Copy link
Author

I am novice, trying to learn things. So, please let me know.
probably you can guide me to how to fix it instead of the fix itself :)

@cpina
Copy link
Owner

cpina commented Jul 28, 2022

I am novice, trying to learn things. So, please let me know. probably you can guide me to how to fix it instead of the fix itself :)

In this execution: https://github.com/jairamjidgekar/test_repo_file_placement/runs/7559369684?check_suite_focus=true#step:4:1

I see that the git command was not valid (there is a git commit and git push in the same line)

In this other execution: https://github.com/jairamjidgekar/test_repo_file_placement/runs/7556893787?check_suite_focus=true#step:3:2

The Python script was executed with many parameters (probably ignored by the Python script) so they didn't have any effect.

If you are new my main suggestion is to read properly the output of the git pushes, try to reproduce them locally.

I haven't looked at the script that generated the output but hopefully this will help you a bit :-)

@jairamjidgekar
Copy link
Author

Sure. I need to go through the inputs and work it on again. thanks for the suggestion.
any references/lead would be really helpful.

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

2 participants