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

No fetch-api-data-action/data.json file after action runs and log indicates "data was succesfully retrieved and saved" #164

Closed
reliztrent opened this issue Aug 29, 2020 · 2 comments

Comments

@reliztrent
Copy link

Thanks for this great action! Appreciate any tips you could give for initial setup: The action appears to runs successfully and the log indicates that the json file has been created, I'm not seeing the data.json file in fetch-api-data-action. Any tips on what I'm missing? Details below.

Description of Issue

  1. Create a new workflow. Name it "Refresh Feed" and set it to run on push.
  2. While editing the workflow, look up "fetch-api-data-action" in marketplace lookup panel. Copy and paste the action as a step, and customize as described in the comments (add an Endpoint and set Retry to True).
  3. Commit new action: https://github.com/reliztrent/reliztrent.github.io/blob/master/.github/workflows/fetch-loc-gov-data.yml
  4. Make another push to repo.
  5. The action runs successfully. The log reports that the data was successfully fetched and saved.
  6. Can't find file at fetch-api-data-action/data.json

Logs

Raw log for the most recent attempt is:

2020-08-29T20:16:06.5897787Z ##[section]Starting: Request a runner to run this job
2020-08-29T20:16:07.4017088Z Can't find any online and idle self-hosted runner in current repository that matches the required labels: 'ubuntu-latest'
2020-08-29T20:16:07.4017196Z Can't find any online and idle self-hosted runner in current repository's account/organization that matches the required labels: 'ubuntu-latest'
2020-08-29T20:16:07.4017659Z Found online and idle hosted runner in current repository's account/organization that matches the required labels: 'ubuntu-latest'
2020-08-29T20:16:07.5936186Z ##[section]Finishing: Request a runner to run this job
2020-08-29T20:16:13.3953319Z Current runner version: '2.273.0'
2020-08-29T20:16:13.3976636Z ##[group]Operating System
2020-08-29T20:16:13.3977309Z Ubuntu
2020-08-29T20:16:13.3977493Z 18.04.5
2020-08-29T20:16:13.3977689Z LTS
2020-08-29T20:16:13.3977850Z ##[endgroup]
2020-08-29T20:16:13.3978017Z ##[group]Virtual Environment
2020-08-29T20:16:13.3978204Z Environment: ubuntu-18.04
2020-08-29T20:16:13.3978698Z Version: 20200817.1
2020-08-29T20:16:13.3978952Z Included Software: https://github.com/actions/virtual-environments/blob/ubuntu18/20200817.1/images/linux/Ubuntu1804-README.md
2020-08-29T20:16:13.3979352Z ##[endgroup]
2020-08-29T20:16:13.3980275Z Prepare workflow directory
2020-08-29T20:16:13.4146690Z Prepare all required actions
2020-08-29T20:16:13.4158269Z Download action repository 'JamesIves/fetch-api-data-action@1.0.15'
2020-08-29T20:16:26.5350979Z ##[group]Run JamesIves/fetch-api-data-action@1.0.15
2020-08-29T20:16:26.5351502Z with:
2020-08-29T20:16:26.5351931Z   ENDPOINT: https://www.loc.gov/maps/?fa=location:cyprus&fo=json&at=results
2020-08-29T20:16:26.5352102Z   RETRY: true
2020-08-29T20:16:26.5352201Z ##[endgroup]
2020-08-29T20:16:28.9241141Z 
2020-08-29T20:16:28.9244602Z     Fetch API Data Action 📦 🚚
2020-08-29T20:16:28.9245341Z 
2020-08-29T20:16:28.9246716Z     🚀 Getting Started Guide: https://github.com/marketplace/actions/fetch-api-data
2020-08-29T20:16:28.9247314Z     🔧 Support: https://github.com/JamesIves/fetch-api-data-action/issues
2020-08-29T20:16:28.9247892Z     ⭐ Contribute: https://github.com/JamesIves/fetch-api-data-action/blob/dev/CONTRIBUTING.md
2020-08-29T20:16:28.9249129Z     
2020-08-29T20:16:28.9249927Z     📣 Maintained by James Ives (https://jamesiv.es)
2020-08-29T20:16:28.9250944Z Checking configuration and initializing… 🚚
2020-08-29T20:16:28.9251873Z Fetching the requested data… 📦
2020-08-29T20:16:29.3847196Z Saving the data... 📁
2020-08-29T20:16:29.3905603Z The data was succesfully retrieved and saved! ✅ 🚚
2020-08-29T20:16:29.3949428Z Cleaning up orphan processes
@JamesIves
Copy link
Owner

JamesIves commented Sep 3, 2020

Thanks for the report, and sorry for the long response time as I just started a new job.

The data in your workflow is only going to save for that instance, this action does not commit the saved file to the repository. You'll need to add an additional commit step in order to actually push it to the repository. There's an example in the readme or you can check out my blog post on the action which explains the process of this!

@reliztrent
Copy link
Author

Thanks, great documentation and it's working beautifully!

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