Skip to content

Commit

Permalink
Fix workflows to download the data in the right folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjagm committed Oct 12, 2024
1 parent cec0d01 commit bc54de1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/sync-contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,22 @@ jobs:
({ login, id, avatar_url, html_url }));
// Store the data in a file
fs.writeFileSync('community.json', JSON.stringify(data, null, 2));
fs.writeFileSync('data/roadmap.json', JSON.stringify(data, null, 2));
- name: Commit changes
run: |
git config user.name "the-json-schema-bot[bot]"
git config user.email "the-json-schema-bot[bot]@users.noreply.github.com"
git add community.json
git diff --quiet && git diff --staged --quiet || (git commit -m "chore(community): update community.json")
git add data/community-users.json
git diff --quiet && git diff --staged --quiet || (git commit -m "chore(community-users): update communit-users.json")
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.get_workflow_token.outputs.token }}
title: 'chore(community): update community.json'
body: 'This PR updates the community.json file with the latest contributors data.'
title: 'chore(community-users): update community-users.json'
body: 'This PR updates the community-users.json file with the latest contributors data.'
branch: 'update-contributors'
base: 'main'
author: 'the-json-schema-bot <the-json-schema-bot[bot]@users.noreply.github.com>'
Expand All @@ -67,7 +67,7 @@ jobs:
assignees: 'the-json-schema-bot'
draft: false
signoff: true
add-paths: 'community.json'
add-paths: 'data/community-users.json'

# Approving with github bot token because one cannot approve their own PRs
- name: Auto Approve
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/sync-project-roadmap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,24 @@ jobs:
}
}
}
}' -f PROJECT_ID=$PROJECT_ID | jq '.data.node.items.nodes' > project_data.json
}' -f PROJECT_ID=$PROJECT_ID | jq '.data.node.items.nodes' > data/roadmap.json
# commit updated project data
- name: Commit changes
run: |
git config user.name "the-json-schema-bot[bot]"
git config user.email "the-json-schema-bot[bot]@users.noreply.github.com"
git add project_data.json
git diff --quiet && git diff --staged --quiet || (git commit -m "chore(project_data): update project_data.json")
git add data/roadmap.json
git diff --quiet && git diff --staged --quiet || (git commit -m "chore(roadmap): update roadmap.json")
# create a pull request
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.get_workflow_token.outputs.token }}
title: 'chore(project_data): update project_data.json'
body: 'This PR updates the project_data.json file with the latest project data.'
title: 'chore(roadmap): update roadmap.json'
body: 'This PR updates the roadmap.json file with the latest project data.'
branch: 'update-project-data'
base: 'main'
author: 'the-json-schema-bot <the-json-schema-bot[bot]@users.noreply.github.com>'
Expand All @@ -112,7 +112,7 @@ jobs:
assignees: 'the-json-schema-bot'
draft: false
signoff: true
add-paths: 'project_data.json'
add-paths: 'data/roadmap.json'

# Approving with github bot token because one cannot approve their own PRs
- name: Auto Approve
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit bc54de1

Please sign in to comment.