Merge pull request #165 from NHSDigital/dependabot/npm_and_yarn/opena… #44
This file contains hidden or 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
| name: Deploy Sandbox API and Docker Image | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| env: | |
| APIM_ENV: sandbox | |
| jobs: | |
| deploy-sandbox: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: '20' | |
| - name: Install Poetry | |
| run: curl -sSL https://install.python-poetry.org | python3 - | |
| - name: Install Python and Node dependencies | |
| run: | | |
| make install | |
| - name: Install proxygen-cli | |
| run: | | |
| pip install proxygen-cli | |
| - name: Set up Proxygen credentials | |
| env: | |
| PROXYGEN_PRIVATE_KEY: ${{ secrets.PROXYGEN_PRIVATE_KEY }} | |
| run: | | |
| mkdir -p ~/.proxygen | |
| echo "$PROXYGEN_PRIVATE_KEY" > ~/.proxygen/eligibility-signposting-api.pem | |
| make setup-proxygen-credentials | |
| - name: Generate sandbox specification | |
| run: | | |
| make construct-spec APIM_ENV=sandbox | |
| make generate-sandbox-spec | |
| - name: Deploy sandbox spec to Proxygen | |
| run: | | |
| proxygen instance deploy sandbox eligibility-signposting-api build/specification/sandbox/eligibility-signposting-api.yaml --no-confirm | |
| - name: Build and publish sandbox Docker image | |
| run: | | |
| make build-and-publish-sandbox-image |