Pantheon Cache Hit Ratio #193
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
name: Pantheon Cache Hit Ratio | |
on: | |
push: | |
workflow_dispatch: | |
inputs: | |
panth-site: | |
description: Pantheon Site | |
required: true | |
type: string | |
default: "amon-carter-web" | |
panth-env: | |
description: Pantheon Environment | |
required: true | |
type: string | |
default: "live" | |
callback: | |
description: Callback url for reporting results. | |
required: false | |
type: string | |
env: | |
DEFAULT_URLS: "amon-carter-web" | |
jobs: | |
lighthouse: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.PANTHEON_SSH_KEY }} | |
config: ${{ secrets.SSH_CONFIG }} | |
known_hosts: ${{ secrets.KNOWN_HOSTS }} | |
# Debugger | |
# - uses: hmarr/debug-action@v2 | |
- name: Inputs | |
run: | | |
echo ${{ inputs.urls }} | |
# Install Terminus. | |
- name: Install Terminus | |
uses: pantheon-systems/terminus-github-actions@main | |
with: | |
pantheon-machine-token: ${{ secrets.PANTHEON_MACHINE_TOKEN }} | |
# Debugger | |
- uses: hmarr/debug-action@v2 | |
- name: Call terminus to get cache hit ratio | |
timeout-minutes: 15 | |
env: | |
PANTEHON_SITE: "${{ inputs.panth-site }}" | |
PANTHEON_ENV: "${{ inputs.panth-env }}" | |
CONNECT_BC_API: "${{ secrets.CONNECT_BC_KEY }}" | |
CALLBACK: "${{ inputs.callback }}" | |
run: | | |
terminus env:metrics ${PANTEHON_SITE}.${PANTHEON_ENV} --format=json > cache_hit_ratio.json | |
curl -X POST -H "api-key: $CONNECT_BC_API" -H 'Content-Type: application/json' -d @"cache_hit_ratio.json" $CALLBACK | |
# - name: Post Artifacts | |
# timeout-minutes: 15 | |
# env: | |
# CONNECT_BC_API: "${{ secrets.CONNECT_BC_KEY }}" | |
# CALLBACK: "${{ inputs.callback }}" | |
# run: ./.github/scripts/chr-push-to-connect.sh |