Skip to content

Add new member to django-commons #1

Add new member to django-commons

Add new member to django-commons #1

Workflow file for this run

name: "Add new member to django-commons"
on:
workflow_dispatch:
inputs:
username:
description: "Username of the new member"
required: true
default: "new_member"
issue_number:
description: "Issue number to reference in the PR body"
required: false
default: "0"
jobs:
add-member:
name: "Add new member"
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Checkout code
uses: actions/checkout@v4
- name: Initialize mandatory git config
run: |
git config user.name "GitHub Actions"
git config user.email [email protected]
- name: Create branch
run: git checkout -b add-user/${{ inputs.username }}
- name: Add user to the list
run: |
python scripts/add_member.py ${{ inputs.username }}
- name: Commit changes
run: |
git add terraform/production/org.tfvars
git commit -m "Add ${{ inputs.username }} to django-commons"
git push origin add-user/${{ inputs.username }}
- name: Create pull request
run: |
gh pr create \
--title "Add ${{ inputs.username }} to django-commons" \
--body "Fix #${{ inputs.issue_number }}" \
--base main \
--head add-user/${{ inputs.username }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}