Bump actions/checkout from 3 to 4 (#169) #32
This file contains 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
--- | |
# This workflow will validate the Kong decK state file and deploy | |
# the application to a target environment | |
name: Deploy Internal Kong | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
paths: | |
- 'common/**' | |
- 'internal/**' | |
- '.github/workflows/*-internal.yaml' | |
- '.github/workflows/*-common.yaml' | |
release: | |
types: [released] | |
jobs: | |
validate: | |
uses: ./.github/workflows/validate-config-common.yaml | |
with: | |
directory: internal | |
deploy: | |
if: github.repository_owner == 'GSA-TTS' | |
needs: validate | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: GSA-TTS/identity-idva-cf-setup@v2 | |
id: cf-setup | |
with: | |
cf-username: ${{ secrets.CF_USERNAME }} | |
cf-password: ${{ secrets.CF_PASSWORD }} | |
cf-org: ${{ secrets.CF_ORG }} | |
space-suffix: "-warpgate" | |
- name: Copy common files | |
run: cp -an common/. internal/ | |
- name: Deploy application | |
run: cf push | |
--vars-file vars.yaml | |
--var ENVIRONMENT_NAME=${{ steps.cf-setup.outputs.target-environment }} | |
--strategy rolling | |
working-directory: internal | |
- name: Apply CF Network Policies | |
run: | | |
cf add-network-policy kong-internal grafana --protocol tcp --port 61443 -s ${{ steps.cf-setup.outputs.target-environment }}-closed | |
cf add-network-policy kong-internal prometheus --protocol tcp --port 61443 -s ${{ steps.cf-setup.outputs.target-environment }}-closed | |
cf add-network-policy kong-internal alertmanager --protocol tcp --port 61443 -s ${{ steps.cf-setup.outputs.target-environment }}-public | |
cf add-network-policy kong-internal es-proxy --protocol tcp --port 61443 -s ${{ steps.cf-setup.outputs.target-environment }} |