Skip to content

Commit

Permalink
Trying to access info from json
Browse files Browse the repository at this point in the history
  • Loading branch information
insolor committed Dec 17, 2024
1 parent 7129b80 commit 86cc650
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/check-for-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ jobs:
id: script
run: echo "updated=$(uv run main.py)" >> $GITHUB_OUTPUT

- name: Create issue if updated
if: ${{ steps.script.outputs.updated == 'yes' }}
run: echo "TODO create issue"

- name: Commit changes
if: ${{ !contains(fromJSON('["push", "pull_request"]'), github.event_name) }} # commit changes only if scheduled
uses: EndBug/[email protected]
Expand All @@ -58,5 +54,14 @@ jobs:
if: ${{ needs.check-for-updates.outputs.updated == 'yes' }}
runs-on: ubuntu-latest
steps:
- name: Create issue if updated
run: echo "TODO create issue"
- uses: actions/checkout@v4

- name: Get data from json
id: get_data
run: echo "json_data=$(cat last_update.json)" >> $GITHUB_OUTPUT

- name: Echo info from json
run: |
echo Title: ${{ fromJson(steps.get_data.outputs.json_data).title }}
echo Body: ${{ fromJson(steps.get_data.outputs.json_data).contents }}
echo URL: ${{ fromJson(steps.get_data.outputs.json_data).url }}
1 change: 1 addition & 0 deletions last_update.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"gid": "1785774543649020", "title": "Fortress Mode Hotfix 50.15", "url": "https://steamstore-a.akamaihd.net/news/externalpost/steam_community_announcements/1785774543649020", "is_external_url": true, "author": "Not Alex", "contents": "Fixed a bug that made hive sprites appear as socks and cloaks ", "feedlabel": "Community Announcements", "date": 1734341458, "feedname": "steam_community_announcements", "feed_type": 1, "appid": 975370, "tags": ["patchnotes"]}

0 comments on commit 86cc650

Please sign in to comment.