🚚 GitHub action for handling authenticated API requests, allowing you to save the data from the request into your workspace as an environment variable and a .json file.
Full Changelog: https://github.com/JamesIves/fetch-api-data-action/compare/v2.3.0...v2.4.0
fetchApiData
as opposed to fetch-api-data
(invalid on Ubuntu). This is not considered a breaking change as this was broken to begin with. This part of the code is not frequently used and thus some iteration was expected here.variable-name
, and defaults to the standard fetchApiData
name if unset. Details can be found in the project readme.@actions/core
so you can now reference fetchApiData
as an output step too should you choose. This was previously documented in the action.yml
file but not actually called in code.Full Changelog: https://github.com/JamesIves/fetch-api-data-action/compare/v2...v2.3.0
Full Changelog: https://github.com/JamesIves/fetch-api-data-action/compare/v2...v2.2.4
Full Changelog: https://github.com/JamesIves/fetch-api-data-action/compare/v2...v2.2.3
format
which allows you to modify the format of the data being saved. You can leverage this to save text data if that is responded via the API request.debug
option as it wasn't properly parsing the response.It's been long overdue, but version 2.0.0 is here.
snake-case
for parameters instead of uppercase with underscores LIKE_THIS
. You can see an example of this below:name: Refresh Feed
on: [push]
jobs:
refresh-feed:
runs-on: ubuntu-latest
steps:
- name: Fetch API Data 📦
uses: JamesIves/[email protected]
with:
endpoint: https://example.com
configuration: '{ "method": "GET", "headers": {"Authorization": "Bearer ${{ secrets.API_TOKEN }}"} }'
save-name: youtube
debug
flag which allows you to log your way through the workflow. With this flag turned on you'll see all API responses the action receives in the terminal. You can find details surrounding this in the README.