Skip to content

✋ [MEMBER] - daniel-cfa #6

✋ [MEMBER] - daniel-cfa

✋ [MEMBER] - daniel-cfa #6

Workflow file for this run

name: "Add new member to django-commons"
on:
issues:
types:
- opened
labels:
- "New member"
jobs:
add-member:
name: "Add new member"
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
pull-requests: write
env:
ISSUE_ID: ${{ github.event.issue.id }}
BRANCH_NAME: "add-user/${{ env.ISSUE_ID }}"

Check failure on line 20 in .github/workflows/add_member.yml

View workflow run for this annotation

GitHub Actions / Add new member to django-commons

Invalid workflow file

The workflow is not valid. .github/workflows/add_member.yml (Line: 20, Col: 20): Unrecognized named-value: 'env'. Located at position 1 within expression: env.ISSUE_ID
steps:
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Checkout code
uses: actions/checkout@v4
- name: Get username to add
id: get_username
run:
python -c "print('USERNAME='+'✋ [MEMBER] - <your handle>'.split(' - ')[1])" >> $GITHUB_ENV
- name: Initialize mandatory git config
run: |
git config user.name "GitHub Actions"
git config user.email noreply@github.com
- name: Create branch
run: git checkout -b ${{ env.BRANCH_NAME }}
- name: Add user to the list
run: |
python scripts/add_member.py ${{ env.USERNAME }}
- name: Commit changes
run: |
git add terraform/production/org.tfvars
git commit -m "Add ${{ env.USERNAME }} to django-commons"
git push origin ${{ env.BRANCH_NAME }}
- name: Create pull request
run: |
gh pr create \
--title "Add ${{ env.USERNAME }} to django-commons" \
--body "Fix #${{ env.ISSUE_ID }}" \
--base main \
--head ${{ env.BRANCH_NAME }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}