diff --git a/.github/workflows/stats_lambda.yml b/.github/workflows/stats_lambda.yml index 7291441678d..266708bcc3e 100644 --- a/.github/workflows/stats_lambda.yml +++ b/.github/workflows/stats_lambda.yml @@ -1,31 +1,31 @@ -# This workflow executes a Lamdba function that recording metrics for each successfully merged PR. +# This workflow executes a Lamdba function that records metrics for each successfully merged PR. # -# You can adjust the behavior by modifying this file. # For more information, see: # https://github.com/marketplace/actions/invoke-aws-lambda -name: Invoke runTheNumbers lambda functions +name: Invoke Lambda function for GitHub example/snippet metrics on: - pull_request: - types: - - closed - workflow_dispatch: + pull_request: + types: + - closed + workflow_dispatch: env: - COMMIT: ${{github.event.pull_request.head.sha}} + COMMIT: ${{github.event.pull_request.head.sha}} jobs: - if_merged: + if_merged: + name: Generate Repo Statistics if: github.event.pull_request.merged == true runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - run: echo "JSON_PAYLOAD={\"commit\" :\"${{ env.COMMIT }}\"}" >> $GITHUB_ENV - - name: Invoke runTheNumbers - uses: gagoar/invoke-aws-lambda@master + - uses: actions/checkout@v2 + - run: echo "JSON_PAYLOAD={\"commit\" :\"${{ env.COMMIT }}\"}" >> $GITHUB_ENV + - name: Invoke runTheNumbers + uses: gagoar/invoke-aws-lambda@master with: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - REGION: 'eu-west-1' - FunctionName: runTheNumbers - Payload: ${{env.JSON_PAYLOAD}} - InvocationType: RequestResponse - LogType: None + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + REGION: 'eu-west-1' + FunctionName: runTheNumbers + Payload: ${{env.JSON_PAYLOAD}} + InvocationType: RequestResponse + LogType: None