Skip to content
Snippets Groups Projects
Unverified Commit 6543ee12 authored by GianlucaOberreit's avatar GianlucaOberreit Committed by GitHub
Browse files

Update committee_creation.yml

Update action to checkout new branch and push changes
parent 79cc7457
No related branches found
No related tags found
1 merge request!12Dev
......@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Generate Committee File
run: |
......@@ -19,6 +19,13 @@ jobs:
sed "s/class example/class $branch_name/g" src/Committees/example.py > "src/Committees/${branch_name}.py"
shell: bash
- name: Switch to New Branch
run: |
branch_name=${{ github.ref }}
git fetch origin $branch_name:$branch_name
git checkout $branch_name
shell: bash
- name: Create Committee Team
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
......@@ -29,3 +36,14 @@ jobs:
-H "Authorization: Bearer $GITHUB_TOKEN" \
-d '{"name":"'$branch_name'","privacy":"closed"}' \
https://api.github.com/orgs/YOUR_ORG/teams
- name: Create Team
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
branch_name=${{ github.ref }}
branch_name=${branch_name#refs/heads/comm/}
curl -X POST \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-d '{"name":"'$branch_name'","privacy":"closed"}' \
https://api.github.com/orgs/YOUR_ORG/teams
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment