Enable deploying exact version of cg-egress-proxy

This commit is contained in:
Ryan Ahearn
2022-11-14 09:49:31 -05:00
parent 929b641e2f
commit fb0fbb984e
2 changed files with 18 additions and 7 deletions

View File

@@ -7,6 +7,12 @@ inputs:
app:
description: application name to be proxied.
required: true
proxy_repo:
description: git repo for cg-egress-proxy
default: https://github.com/rahearn/cg-egress-proxy.git
proxy_version:
description: git ref to be deployed
default: main
runs:
using: composite
steps:
@@ -20,15 +26,17 @@ runs:
shell: bash
id: create-temp-dir
run: echo "path=$(mktemp -d -t egress-XXXXXXXXXX --tmpdir=$RUNNER_TEMP)" >> $GITHUB_OUTPUT
- name: Clone egress-proxy
- name: Clone cg-egress-proxy
shell: bash
run: git clone https://github.com/rahearn/cg-egress-proxy.git ${{ steps.create-temp-dir.outputs.path }}
run: git clone ${{ inputs.proxy_repo }} ${{ steps.create-temp-dir.outputs.path }}
- name: Switch to deploy ref
shell: bash
working_directory: ${{ steps.create-temp-dir.outputs.path }}
run: git checkout ${{ inputs.proxy_version }}
- name: Copy config files
shell: bash
run: cp ./deploy-config/egress_proxy/${{ inputs.app }}.*.acl ${{ steps.create-temp-dir.outputs.path }}
- name: Build and deploy proxy
shell: bash
run: >
cd ${{ steps.create-temp-dir.outputs.path }};
make;
./bin/cf-deployproxy -a ${{ inputs.app }} -p egress-proxy -e egress_proxy
working_directory: ${{ steps.create-temp-dir.outputs.path }}
run: make && ./bin/cf-deployproxy -a ${{ inputs.app }} -p egress-proxy -e egress_proxy

View File

@@ -75,7 +75,10 @@ jobs:
id: changed-egress-config
uses: tj-actions/changed-files@v34
with:
files: deploy-config/egress_proxy/notify-api-staging.*.acl
files: |
deploy-config/egress_proxy/notify-api-staging.*.acl
.github/actions/deploy-proxy/action.yml
.github/workflows/deploy.yml
- name: Deploy egress proxy
if: steps.changed-egress-config.outputs.any_changed == 'true'
uses: ./.github/actions/deploy-proxy