0g-chain/.github/workflows/metric-pipeline.yml

40 lines
1.1 KiB
YAML
Raw Normal View History

2022-12-15 19:45:18 +00:00
name: Metric Pipeline
on:
workflow_call:
inputs:
aws-region:
required: true
type: string
2022-12-15 22:07:54 +00:00
metric-name:
required: true
type: string
namespace:
required: true
type: string
2022-12-15 19:45:18 +00:00
secrets:
CI_AWS_KEY_ID:
required: true
CI_AWS_KEY_SECRET:
required: true
jobs:
metric-pipeline-result:
runs-on: ubuntu-latest
steps:
# Make sure the secrets are stored in you repo settings
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.CI_AWS_KEY_ID }}
aws-secret-access-key: ${{ secrets.CI_AWS_KEY_SECRET }}
aws-region: ${{ inputs.aws-region }}
if: always() # Setup credentials even if the workflow failed
2022-12-15 22:07:54 +00:00
- name: Metric Pipleline Success
2022-12-15 19:45:18 +00:00
# replace TAG by the latest tag in the repository
uses: ros-tooling/action-cloudwatch-metrics@0.0.5
if: always() # Need to run to log the workflow failure
2022-12-15 22:07:54 +00:00
with:
metric-name: ${{ inputs.metric-name }}
namespace: ${{ inputs.namespace }}