Skip to content

Commit

Permalink
change workflow trigger for health_check
Browse files Browse the repository at this point in the history
  • Loading branch information
0618 committed Jan 23, 2024
1 parent e827bf9 commit 45de9e2
Showing 1 changed file with 46 additions and 42 deletions.
88 changes: 46 additions & 42 deletions .github/workflows/canary_checks.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: canary_checks

on:
push:
branches:
- poc/package-manager-support
- poc/pms-use-health-check
schedule:
- cron: '0 */1 * * *' # runs every hour
workflow_dispatch:
Expand Down Expand Up @@ -54,45 +58,45 @@ jobs:
shell: bash
run: |
npm run live-dependency-health-checks
log-failure-metric:
runs-on: ubuntu-latest
needs:
[local_checks_with_latest_dependencies, live_dependency_health_checks]
permissions:
# these permissions are required for the configure-aws-credentials action to get a JWT from GitHub
id-token: write
contents: read
if: ${{ failure() }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # version 3.6.0
- name: Log failure
uses: ./.github/actions/log-metric
with:
metric-name: WorkflowExecutionFailure
value: 1
# github.workflow - workflow name
# github.ref_name - branch or tag name
dimensions: workflow=${{ github.workflow }},ref_name=${{ github.ref_name }}
role-to-assume: ${{ secrets.METRICS_EMITTER_ROLE_ARN }}
aws-region: us-west-2
log-success-metric:
runs-on: ubuntu-latest
needs:
[local_checks_with_latest_dependencies, live_dependency_health_checks]
permissions:
# these permissions are required for the configure-aws-credentials action to get a JWT from GitHub
id-token: write
contents: read
if: ${{ success() }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # version 3.6.0
- name: Log success
uses: ./.github/actions/log-metric
with:
metric-name: WorkflowExecutionFailure
value: 0
# github.workflow - workflow name
# github.ref_name - branch or tag name
dimensions: workflow=${{ github.workflow }},ref_name=${{ github.ref_name }}
role-to-assume: ${{ secrets.METRICS_EMITTER_ROLE_ARN }}
aws-region: us-west-2
# log-failure-metric:
# runs-on: ubuntu-latest
# needs:
# [local_checks_with_latest_dependencies, live_dependency_health_checks]
# permissions:
# # these permissions are required for the configure-aws-credentials action to get a JWT from GitHub
# id-token: write
# contents: read
# if: ${{ failure() }}
# steps:
# - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # version 3.6.0
# - name: Log failure
# uses: ./.github/actions/log-metric
# with:
# metric-name: WorkflowExecutionFailure
# value: 1
# # github.workflow - workflow name
# # github.ref_name - branch or tag name
# dimensions: workflow=${{ github.workflow }},ref_name=${{ github.ref_name }}
# role-to-assume: ${{ secrets.METRICS_EMITTER_ROLE_ARN }}
# aws-region: us-west-2
# log-success-metric:
# runs-on: ubuntu-latest
# needs:
# [local_checks_with_latest_dependencies, live_dependency_health_checks]
# permissions:
# # these permissions are required for the configure-aws-credentials action to get a JWT from GitHub
# id-token: write
# contents: read
# if: ${{ success() }}
# steps:
# - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # version 3.6.0
# - name: Log success
# uses: ./.github/actions/log-metric
# with:
# metric-name: WorkflowExecutionFailure
# value: 0
# # github.workflow - workflow name
# # github.ref_name - branch or tag name
# dimensions: workflow=${{ github.workflow }},ref_name=${{ github.ref_name }}
# role-to-assume: ${{ secrets.METRICS_EMITTER_ROLE_ARN }}
# aws-region: us-west-2

0 comments on commit 45de9e2

Please sign in to comment.