Onboarding Checklist Issue #3
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
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 |