Skip to content

πŸ³οΈβ€βš§οΈπŸ³οΈβ€πŸŒˆ Edit u #351

πŸ³οΈβ€βš§οΈπŸ³οΈβ€πŸŒˆ Edit u

πŸ³οΈβ€βš§οΈπŸ³οΈβ€πŸŒˆ Edit u #351

Workflow file for this run

name: "Register Subdomain"
on:
issues:
types: [opened]
jobs:
Register:
runs-on: ubuntu-latest
if: github.event.issue.title == 'Register'
permissions:
issues: write
steps:
- name: Checkout
uses: actions/checkout@v2.3.1
- name: Register Subdomain
env:
EVENT_ISSUE_BODY: ${{ github.event.issue.body }}
EVENT_USER_LOGIN: ${{ github.event.issue.user.login }}
CF_TOKEN: ${{ secrets.CF_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm i cloudflare
node --no-deprecation register > data.csv
cat data.csv
comment=$(cut -d "|" -f 2 data.csv)
reason=$(cut -d "|" -f 1 data.csv)
domain=$(cut -d "|" -f 3 data.csv)
gh issue edit https://github.com/lgbt-sh/lgbt-sh/issues/${{ github.event.issue.number }} -t "πŸ³οΈβ€βš§οΈπŸ³οΈβ€πŸŒˆ Register $domain" --add-label "domain register"
if [ "$reason" = "completed" ]
then
gh issue edit https://github.com/lgbt-sh/lgbt-sh/issues/${{ github.event.issue.number }} --add-label "success"
else
gh issue edit https://github.com/lgbt-sh/lgbt-sh/issues/${{ github.event.issue.number }} --add-label "failed"
fi
gh issue close https://github.com/lgbt-sh/lgbt-sh/issues/${{ github.event.issue.number }} --comment "$comment" --reason "$reason"