File tree Expand file tree Collapse file tree 4 files changed +89
-0
lines changed
Expand file tree Collapse file tree 4 files changed +89
-0
lines changed Original file line number Diff line number Diff line change 1+ name : " Build Proxies"
2+ description : " Build Proxies"
3+ inputs :
4+ version :
5+ description : " Version number"
6+ required : true
7+ runs :
8+ using : composite
9+
10+ steps :
11+ - name : Checkout
12+ uses : actions/checkout@v4
13+ - uses : actions/setup-node@v4
14+ with :
15+ node-version : 24
16+
17+ - name : Npm install
18+ working-directory : .
19+ run : npm ci
20+ shell : bash
21+
22+ - name : Build oas
23+ working-directory : .
24+ shell : bash
25+ run : |
26+ make publish-oas
27+
28+ - name : Setup Proxy Name
29+ shell : bash
30+ run : |
31+
32+ if [ -z $PR_NUMBER ]
33+ then
34+ echo "INSTANCE=$PROXYGEN_API_NAME" >> $GITHUB_ENV
35+ else
36+ echo "INSTANCE=$PROXYGEN_API_NAME-$PR_NUMBER" >> $GITHUB_ENV
37+ fi
38+
39+ echo "Instance name set to: $PROXYGEN_API_NAME${PR_NUMBER:+-$PR_NUMBER}"
40+
41+
42+
43+ - name : Install Proxygen client
44+ shell : bash
45+ run : |
46+ # Install proxygen cli
47+ pip install proxygen-cli
48+
49+ # Setup proxygen auth and settings
50+ mkdir -p ${HOME}/.proxygen
51+ echo -n $PROXYGEN_PRIVATE_KEY > ${HOME}/.proxygen/key
52+ envsubst < ./.github/proxygen-credentials-template.yaml > ${HOME}/.proxygen/credentials.yaml
53+ envsubst < ./.github/proxygen-credentials-template.yaml | cat
54+ envsubst < ./.github/proxygen-settings.yaml > ${HOME}/.proxygen/settings.yaml
55+ envsubst < ./.github/proxygen-settings.yaml | cat
56+
57+ - name : Deploy to Internal Dev Sandbox
58+ shell : bash
59+ run : |
60+ proxygen instance deploy internal-dev-sandbox $INSTANCE build/notify-supplier.json --no-confirm
61+
62+ - name : Deploy to Internal Dev
63+ shell : bash
64+ run : |
65+ proxygen instance deploy internal-dev $INSTANCE build/notify-supplier.json --no-confirm
Original file line number Diff line number Diff line change 1+ client_id : $PROXYGEN_CLIENT_ID
2+ key_id : $PROXYGEN_KID
3+ private_key_path : key
4+ base_url : https://identity.prod.api.platform.nhs.uk/realms/api-producers
Original file line number Diff line number Diff line change 1+ endpoint_url : https://proxygen.prod.api.platform.nhs.uk
2+ api : hello-world
Original file line number Diff line number Diff line change 8181 with :
8282 version : " ${{ inputs.version }}"
8383
84+ artefact-proxies :
85+ name : " Build proxies"
86+ runs-on : ubuntu-latest
87+ timeout-minutes : 10
88+ env :
89+ PROXYGEN_PRIVATE_KEY : ${{ secrets.PROXYGEN_NOTIFY_SUPPLIER_PRIVATE_KEY }}
90+ PROXYGEN_KID : notify-supplier-key-1
91+ PROXYGEN_CLIENT_ID : nhs-notify-supplier-client
92+ PROXYGEN_API_NAME : nhs-notify-supplier
93+ PR_NUMBER : ${{ github.event.pull_request.number }}
94+ steps :
95+ - name : " Checkout code"
96+ uses : actions/checkout@v4
97+ - name : " Build proxies"
98+ uses : ./.github/actions/build-proxies
99+ with :
100+ version : " ${{ inputs.version }}"
101+
84102 # artefact-1:
85103 # name: "Artefact 1"
86104 # runs-on: ubuntu-latest
You can’t perform that action at this time.
0 commit comments