Merge pull request #864 from GSA/dependabot/npm_and_yarn/app/static/u… #608
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: 2 - Deploy | |
| on: | |
| push: | |
| branches: | |
| - main | |
| # default minimal permissions for every job | |
| permissions: | |
| contents: read | |
| env: | |
| PY_VERSION: "3.12.13" | |
| POETRY_VERSION: "latest" | |
| jobs: | |
| create-cloudgov-services-staging: | |
| name: create services (staging) | |
| environment: staging | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v7 | |
| - name: create services | |
| uses: cloud-gov/cg-cli-tools@main | |
| with: | |
| command: bash create_cloudgov_services.sh | |
| cf_org: gsa-datagov | |
| cf_space: staging | |
| cf_username: ${{secrets.CF_SERVICE_USER}} | |
| cf_password: ${{secrets.CF_SERVICE_AUTH}} | |
| create-cloudgov-services-prod: | |
| name: create services (prod) | |
| environment: prod | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v7 | |
| - name: create services | |
| uses: cloud-gov/cg-cli-tools@main | |
| with: | |
| command: bash create_cloudgov_services.sh | |
| cf_org: gsa-datagov | |
| cf_space: prod | |
| cf_username: ${{secrets.CF_SERVICE_USER}} | |
| cf_password: ${{secrets.CF_SERVICE_AUTH}} | |
| deploy-staging: | |
| name: deploy (staging) | |
| needs: | |
| - create-cloudgov-services-staging | |
| environment: staging | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: write | |
| contents: read | |
| steps: | |
| - name: Check out the code | |
| uses: actions/checkout@v7 | |
| - name: Deploy via composite action | |
| uses: ./.github/actions/deploy | |
| with: | |
| cf_space: staging | |
| python-version: ${{ env.PY_VERSION }} | |
| poetry-version: ${{ env.POETRY_VERSION }} | |
| cf_username: ${{ secrets.CF_SERVICE_USER }} | |
| cf_password: ${{ secrets.CF_SERVICE_AUTH }} | |
| deploy-prod: | |
| name: deploy (prod) | |
| needs: | |
| - create-cloudgov-services-prod | |
| - deploy-staging | |
| environment: prod | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: write | |
| contents: read | |
| steps: | |
| - name: Check out the code | |
| uses: actions/checkout@v7 | |
| - name: Deploy via composite action | |
| uses: ./.github/actions/deploy | |
| with: | |
| cf_space: prod | |
| python-version: ${{ env.PY_VERSION }} | |
| poetry-version: ${{ env.POETRY_VERSION }} | |
| cf_username: ${{ secrets.CF_SERVICE_USER }} | |
| cf_password: ${{ secrets.CF_SERVICE_AUTH }} | |
| network-policies: | |
| name: Add network-policies | |
| needs: | |
| - deploy-staging | |
| - deploy-prod | |
| runs-on: ubuntu-latest | |
| environment: ${{ matrix.environ }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| command: [ | |
| "cf add-network-policy datagov-harvest-proxy datagov-harvest --protocol tcp --port 61443", | |
| "cf add-network-policy datagov-harvest mdtranslator --protocol tcp --port 8080" | |
| ] | |
| environ: ["staging", "prod"] | |
| steps: | |
| - name: Add network policy | |
| uses: cloud-gov/cg-cli-tools@main | |
| with: | |
| command: ${{ matrix.command }} | |
| cf_org: gsa-datagov | |
| cf_space: ${{ matrix.environ }} | |
| cf_username: ${{secrets.CF_SERVICE_USER}} | |
| cf_password: ${{secrets.CF_SERVICE_AUTH}} |