Skip to content

Commit cf3421f

Browse files
Create private-dataminer-cicd-devopsexercise.yml
1 parent 2698454 commit cf3421f

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Exercise Workflow
2+
3+
# Controls when the workflow will run
4+
on:
5+
# Triggers the workflow on pull request events
6+
pull_request_target:
7+
8+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
9+
jobs:
10+
11+
HandleResults:
12+
runs-on: ubuntu-latest
13+
name: Forwarding Results.
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
ref: ${{ github.event.pull_request.head.sha }}
18+
- name: Zip Release
19+
uses: TheDoctor0/zip-release@0.7.1
20+
with:
21+
filename: "${{ github.event.pull_request.user.login }}_FromPR.zip"
22+
exclusions: '*.git*'
23+
24+
- uses: licenseware/send-email-notification@v1
25+
with:
26+
api-key: ${{ secrets.SENDGRID_API_KEY }}
27+
subject: (DevOpsExercise)DevOpsExercise1_PR_${{ github.event.pull_request.user.login }}
28+
from-email: devops-exercise-noreply@skyline.be
29+
to-email: ${{ secrets.MAILADDRESS }}
30+
markdown-body: |
31+
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 }}.
32+
attachments: ./${{ github.event.pull_request.user.login }}_FromPR.zip
33+
attachments-disposition: attachment
34+
- name: Close Pull
35+
run: gh pr close ${{ github.event.number }} --comment "Auto-closing pull request. Results were forwarded to Skyline." --delete-branch
36+
env:
37+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)