Skip to content

Commit

Permalink
Merge pull request #117 from DSACMS/dev
Browse files Browse the repository at this point in the history
Bug Fixes and Checklist Update to Main
  • Loading branch information
IsaacMilarky authored Jul 10, 2024
2 parents 74856e3 + 5bb7b9c commit 0a44dc5
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 15 deletions.
24 changes: 13 additions & 11 deletions .github/extendJSON/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,26 @@ name: 'extendJSONRepolinter'

description: 'Returns raw JSON given a file that uses the extends key'


inputs:
url_to_json:
description: 'URL to JSON file'
default: 'https://raw.githubusercontent.com/DSACMS/repo-scaffolder/main/tier1/%7B%7Bcookiecutter.project_slug%7D%7D/repolinter.json'
required: true
type: string

url_to_json:
description: 'URL to JSON file'
default: 'https://raw.githubusercontent.com/DSACMS/repo-scaffolder/main/tier1/%7B%7Bcookiecutter.project_slug%7D%7D/repolinter.json'
required: true
type: string
outputs:
raw-json:
description: 'JSON of the file'
value: ${{ steps.resolve-step.outputs.RAW_JSON }}

runs:
using: 'composite'
steps:
- name: Checkout Action
uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.9'
with:
python-version: '3.9'

- name: Extend JSON and write to env
id: resolve-step
run: |
extended=$(python3 ${{ github.action_path }}/resolve.py ${{ inputs.url_to_json }})
echo $extended
Expand Down
6 changes: 5 additions & 1 deletion .github/extendJSON/resolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@ def resolve_extended_json_file(file_data_dict):
resolve = resolve_extended_json_file(superJsonDict)

resolve['rules'].update(file_data_dict)
resolve['rules'].pop('axioms')
resolve['rules'].pop('$schema')
resolve['rules'].pop('version')
resolve['rules'].pop('rules')

return resolve

#Grab base url
baseUrl = sys.argv[1]

print(resolve_extended_json_file(get_json_dict_from_url(baseUrl)))
print(json.dumps(resolve_extended_json_file(get_json_dict_from_url(baseUrl))))
16 changes: 13 additions & 3 deletions .github/workflows/extendJSONFile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,26 @@ on:
default: 'https://raw.githubusercontent.com/DSACMS/repo-scaffolder/main/tier1/%7B%7Bcookiecutter.project_slug%7D%7D/repolinter.json'
required: true
type: string
outputs:
raw-json:
description: 'JSON of the file'
value: ${{ jobs.extend-json.outputs.raw-json }}

jobs:
extend-json:
runs-on: ubuntu-latest
name: Extend JSON file with extends property
outputs:
raw-json: ${{ steps.extend-json.outputs.RAW_JSON }}
raw-json: ${{ steps.extend-json.outputs.raw-json }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: DSACMS/repo-scaffolder
ref: main
path: workflows
- name: Extend JSON
id: extend-json
uses: ./.github/extendJSON
uses: ./workflows/.github/extendJSON
with:
url_to_json: ${{ github.event.inputs.url_to_json }
url_to_json: ${{ inputs.url_to_json }}
Binary file modified tier1/checklist.pdf
Binary file not shown.
Binary file modified tier2/checklist.pdf
Binary file not shown.
Binary file modified tier3/checklist.pdf
Binary file not shown.
Binary file modified tier4/checklist.pdf
Binary file not shown.

0 comments on commit 0a44dc5

Please sign in to comment.