Skip to content

USA 3 nested domain #24

USA 3 nested domain

USA 3 nested domain #24

name: Create branch from issue
on:
issues:
types: [labeled]
jobs:
createNewBranch:
if: github.event.label.name == 'data request'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Create new branch and commit
run: |
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
git checkout -b issue-${{ github.event.issue.number }}/request
echo "${{ github.event.issue.number }}" > issue.txt
git add issue.txt
git commit -m "Add file for issue #${{ github.event.issue.number }}"
git push origin issue-${{ github.event.issue.number }}/request
- name: Add 'submitted' label to issue
uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ['submitted']
})