-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (39 loc) · 1.49 KB
/
onboarding.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Onboarding Checklist Issue
on:
workflow_dispatch:
inputs:
employee_name:
description: "The name of the new employee"
required: true
type: string
employee_email:
description: "The email of the new employee"
required: true
type: string
jobs:
create-onboarding-issue:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install GitHub CLI
run: sudo apt-get install gh
- name: Read onboarding checklist
id: onboarding_checklist
env:
EMPLOYEE_NAME: ${{ github.event.inputs.employee_name }}
EMPLOYEE_EMAIL: ${{ github.event.inputs.employee_email }}
run: |
sed -i "s/{{ employee_name }}/$EMPLOYEE_NAME/g" employee-lifecycle/onboarding-checklist.md
sed -i "s/{{ employee_email }}/$EMPLOYEE_EMAIL/g" employee-lifecycle/onboarding-checklist.md
CONTENT=$(cat employee-lifecycle/onboarding-checklist.md)
echo "content<<EOF" >> $GITHUB_ENV
echo "$CONTENT" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Create GitHub issue for onboarding
env:
ISSUE_BODY: ${{ env.content }}
EMPLOYEE_NAME: ${{ github.event.inputs.employee_name }}
GH_TOKEN: ${{ github.token }}
run: |
gh issue create --title "New Employee Onboarding Checklist for $EMPLOYEE_NAME" --body "$ISSUE_BODY" --label onboarding --assignee richford