Skip to content

Commit

Permalink
init matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoerdbeentjes committed Oct 3, 2024
1 parent 38588a5 commit d258756
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main-migrations.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Main migrations
name: Deploy production

on:
pull_request:
Expand Down
23 changes: 22 additions & 1 deletion .github/workflows/staging-migrations.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Staging migrations
name: Deploy staging

on:
pull_request:
Expand Down Expand Up @@ -43,3 +43,24 @@ jobs:
DATO_API_KEY_OPENEARTH_DATA_VIEWER: ${{ secrets.DATO_API_KEY_OPENEARTH_DATA_VIEWER }}
DATO_API_KEY_NL2120: ${{ secrets.DATO_API_KEY_NL2120 }}
run: npm run migrations:apply-staging

deploy-application:
- name: Checkout repository
uses: actions/checkout@v4

- name: Prepare
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Set matrix data
id: set-matrix
run: node -e 'console.log(JSON.stringify(require("./config/dato/instances.js").instances))' >> $GITHUB_OUTPUT

- name: Print
runs-on: ubuntu-latest
needs: prepare
strategy:
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}
steps:
- run: echo ${{ matrix.name }}
1 change: 1 addition & 0 deletions test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"name":"nl2120","key":"39e63433dbdb89e7e1642e7d39773a"},{"name":"openearth-data-viewer","key":"f29178f5a096e016eca5ad1308fa8a"},{"name":"openearth-rws-viewer","key":"b5e48365d633c820bdd9fee22b9e28"}]

0 comments on commit d258756

Please sign in to comment.