Skip to content

Commit

Permalink
employee registration
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhomann-Dey committed Sep 7, 2024
0 parents commit 0acfaf9
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/ctf-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Employee Registration
description: Complete your registration to get access to the Nova Corps database.
title: "[NC] Employee Registration"
labels: []
assignees: []
body:
- type: input
id: username
attributes:
label: Username
description: "Please enter your Nova Corps username"
placeholder: "CTFUser"
validations:
required: true

21 changes: 21 additions & 0 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Cleanup"
permissions:
actions: write

on:
workflow_run:
workflows: [Create PR]
types:
- completed

jobs:
del_runs:
runs-on: ubuntu-latest
steps:
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@v2
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: 0
keep_minimum_runs: 0
30 changes: 30 additions & 0 deletions .github/workflows/create-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Create PR
on:
workflow_dispatch:
inputs:
owner:
description: "Owner"
required: true
username:
description: "Username"
required: true
forkName:
description: "Fork Name"
required: true
jobs:
verify:
name: Submit PR
runs-on: ubuntu-latest
steps:
- name: Check fork
if: github.event.repository.fork == true
run: |
echo "This workflow must run on the parent repository"
exit 1
- name: open-pull-request
uses: fjogeleit/http-request-action@v1
with:
url: "https://api.github.com/repos/${{ inputs.username }}/${{ inputs.forkName }}/pulls"
method: "POST"
customHeaders: '{"Accept": "application/vnd.github+json", "Authorization": "Bearer ${{ secrets.USER_PAT }}", "X-GitHub-Api-Version":"2022-11-28"}'
data: '{ "title":"Step 2", "body":"##Nova Corps Employee Registration\n\nReview PR for further details.", "head":"${{ inputs.owner }}:${{ inputs.username }}", "base":"main" }'
41 changes: 41 additions & 0 deletions .github/workflows/submit-token.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Submit Employee Verification
on:
workflow_dispatch:
inputs:
username:
description: "Nova Corps Username"
required: true
verificationCode:
description: "Token"
required: true
jobs:
verify:
name: Submit Verification
runs-on: ubuntu-latest
steps:
- name: Check fork
if: github.event.repository.fork == false
run: |
echo "This workflow must run on your fork"
exit 1
- name: Mask Input
id: add_mask
run: |
VERIFICATION_CODE=$(jq -r '.inputs.verificationCode' $GITHUB_EVENT_PATH)
echo ::add-mask::$VERIFICATION_CODE
echo SECRET_CODE="$VERIFICATION_CODE" >> $GITHUB_ENV
- name: Submit Verification
id: verification
uses: fjogeleit/http-request-action@v1
with:
url: "https://engine.rewst.io/webhooks/custom/trigger/0190fba7-081e-742e-a14a-c42dacfac02c/019017b6-72c5-751d-8e29-d354b64e3420"
method: "POST"
customHeaders: '{"Content-Type": "application/json", "x-rewst-secret": "Tributary-Flashbulb-Shaky" }'
data: '{ "username": "${{ inputs.username }}", "token": "${{ env.SECRET_CODE }}", "ghuser": "${{ github.event.sender.id }}" }'
timeout: 30000

- name: Submission Response
run: |
echo ${{ fromJson(steps.verification.outputs.response).response }} >> $GITHUB_STEP_SUMMARY
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Nova Corps Employee Registration

![](https://static.wikia.nocookie.net/marvels-guardians-of-the-galaxy/images/2/21/Nova_Corps_banner.png/revision/latest?cb=20240217233012)

Welcome to the Nova Corps, esteemed new recruits! As integral members of this elite intergalactic force, you’re stepping into a legacy of valor and justice. The Nova Corps is dedicated to protecting the universe from cosmic threats, upholding peace, and ensuring the safety of countless civilizations. Our mission spans from the far reaches of the cosmos to the very heart of the galaxy, and you will be at the forefront of this noble cause. Your training will be rigorous, and the responsibilities immense, but you will be supported by a team of the galaxy's finest. Welcome aboard!

Start by submitting your personal information info the Nova Corps Database. If you have any issues, be sure to let us know.

0 comments on commit 0acfaf9

Please sign in to comment.