Bump actions/checkout from 3 to 4 (#169) #28
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 Ingress Kong | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
paths: | |
- 'common/**' | |
- 'ingress/**' | |
- '.github/workflows/*-ingress.yaml' | |
- '.github/workflows/*-common.yaml' | |
release: | |
types: [released] | |
jobs: | |
validate: | |
uses: ./.github/workflows/validate-config-common.yaml | |
with: | |
directory: ingress | |
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: "-closed" | |
- name: Copy common files | |
run: cp -an common/. ingress/ | |
- name: Deploy application | |
run: cf push | |
--vars-file vars.yaml | |
--var ENVIRONMENT_NAME=${{ steps.cf-setup.outputs.target-environment }} | |
--strategy rolling | |
working-directory: ingress | |
- name: Apply CF Network Policies | |
run: | | |
cf add-network-policy kong sk-api --protocol tcp --port 61443 -s ${{ steps.cf-setup.outputs.target-environment }} | |
cf add-network-policy kong sk-sdk --protocol tcp --port 61443 -s ${{ steps.cf-setup.outputs.target-environment }}-closed | |
cf add-network-policy kong sk-portal --protocol tcp --port 61443 -s ${{ steps.cf-setup.outputs.target-environment }}-closed | |
cf add-network-policy kong incode --protocol tcp --port 61443 -s ${{ steps.cf-setup.outputs.target-environment }} | |
cf add-network-policy kong kong-egress --protocol tcp --port 61443 -s ${{ steps.cf-setup.outputs.target-environment }}-public |