-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added a workflow to list product repositories
- Loading branch information
1 parent
f818a23
commit 153084b
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// This file contains the json2csv transformation config to create a CSV | ||
// See: https://juanjodiaz.github.io/json2csv/#/parsers/cli | ||
export default { | ||
fields: [ | ||
{ | ||
label: '', | ||
value: row => { | ||
return row.nameWithOwner + '@' + row.defaultBranchRef.name | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# This workflow lists all repositories matching specific topics. | ||
# It is useful to obtain the list of repositories that needs to be updated by the file-sync workflow | ||
# and then copy/paste this list in the configuration | ||
name: Delivery - List repositories | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
sync-repos-labels: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
|
||
- name: Get Org Repositories | ||
id: get-repos | ||
uses: fgerthoffert/[email protected] | ||
with: | ||
org: jahia | ||
token: ${{ secrets.GH_ISSUES_PRS_CHORES }} | ||
filter_topics: product,community | ||
filter_operator: OR | ||
filter_ignore_archived: true | ||
|
||
- name: Convert the NDJSON to CSV | ||
shell: bash | ||
run: | | ||
npx @json2csv/cli -i ${{ steps.get-repos.outputs.artifact_filepath }} --ndjson --config ${{ github.workspace }}/.github/delivery-list-repos-cfg.js -o repositories.csv | ||
- name: List repositories | ||
shell: bash | ||
run: | | ||
cat repositories.csv | tr -d \" | ||