Add a step to validate the JSON config generated for Docker

This commit is contained in:
Felipe Knorr Kuhn 2024-02-06 19:47:09 -08:00
parent fea115bcbc
commit 624cbf05c0
No known key found for this signature in database
GPG Key ID: 79619B52BB097C1A
2 changed files with 30 additions and 1 deletions

View File

@ -329,4 +329,32 @@ jobs:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
validate_docker_json:
if: "!contains(github.event.pull_request.labels.*.name, 'ops') && !contains(github.head_ref, 'ops/')"
runs-on: "ubuntu-latest"
name: Validate generated backend Docker JSON
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: docker
- name: Install jq
run: sudo apt-get install jq -y
- name: Create new start script to run on CI
run: |
sed '$d' start.sh > start_ci.sh
working-directory: docker/docker/backend
- name: Run the script to generate the sample JSON
run: |
sh start_ci.sh
working-directory: docker/docker/backend
- name: Validate JSON syntax
run: |
cat mempool-config.json | jq
working-directory: docker/docker/backend

1
.gitignore vendored
View File

@ -6,3 +6,4 @@ backend/mempool-config.json
frontend/src/resources/config.template.js
frontend/src/resources/config.js
target
docker/backend/start_ci.sh