Skip to content

Pull request for Kata#1 #97

Pull request for Kata#1

Pull request for Kata#1 #97

name: Exercise Workflow
# Controls when the workflow will run
on:
# Triggers the workflow on pull request events
pull_request_target:
types: [opened]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
HandleResults:
runs-on: ubuntu-latest
name: Forwarding Results.
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Zip Release
uses: TheDoctor0/[email protected]
with:
filename: "${{ github.event.pull_request.user.login }}_FromPR.zip"
exclusions: '*.git*'
- uses: licenseware/send-email-notification@v1
with:
api-key: ${{ secrets.SENDGRID_API_KEY }}
subject: (DevOpsExercise)DevOpsExercise1_PR_${{ github.event.pull_request.user.login }}
from-email: [email protected]
to-email: ${{ secrets.MAILADDRESS }}
markdown-body: |
This is an automatic e-mail containing devops exercise results for ${{ github.repository }}. The attachment is a pull request made by user ${{ github.event.pull_request.user.login }}.
attachments: ./${{ github.event.pull_request.user.login }}_FromPR.zip
attachments-disposition: attachment
- name: Close Pull
run: gh pr close ${{ github.event.number }} --comment "Auto-closing pull request. Results were forwarded to Skyline." --delete-branch
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}