-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
20 additions
and
20 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |