Skip to content

Commit

Permalink
output email address
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Jan 5, 2024
1 parent f82343c commit c77a799
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/validate-new-contributor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ on:

env:
PYTHON_VERSION: 3.11
WORKING_DIR: .github/scripts/python/validate_new_contributor
WORKING_DIR: .github/scripts/python/validate-new-contributor

jobs:
validate:
runs-on: ubuntu-latest
outputs:
email-address: ${{ steps.output-email-address.outputs.EMAIL_ADDRESS }}
steps:
- name: 🛫 Checkout
uses: actions/checkout@v4
Expand All @@ -39,6 +41,11 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}
working-directory: ${{ env.WORKING_DIR }}

- name: 🕵️ Validate New Contributor
working-directory: ${{ env.WORKING_DIR }}
run: pipenv run python validate_new_contributor.py
# - name: 🕵️ Validate New Contributor
# working-directory: ${{ env.WORKING_DIR }}
# run: pipenv run python validate_new_contributor.py

- name: 📧 Output Email Address
if: ${{ github.event_name == 'workflow_call' }}
id: output-email-address
run: echo "EMAIL_ADDRESS=stefan.kairinos@ocado.com" >> "$GITHUB_OUTPUT"
4 changes: 2 additions & 2 deletions .github/workflows/verify-new-contributor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
number: ${{ inputs.pull-request-number }}
number: 53 #${{ inputs.pull-request-number }}
review-state: APPROVED

validate-new-contributor:
Expand All @@ -35,6 +35,6 @@ jobs:
uses: ocadotechnology/codeforlife-workspace/.github/actions/python/send-email@new_contributor_validations # TODO: use @main
with:
auth: ${{ secrets.DOTDIGITAL_API_USER_AUTH }}
to-addresses: '["${{ env.CONTRIBUTOR_EMAIL_ADDRESS }}"]'
to-addresses: '["${{ needs.validate-new-contributor.outputs.email-address }}"]'
campaign-id: 1506387
personalization-values: '[{"name": "PR_URL", "value": "https://www.codeforlife.education/"}]' # TODO: real url

0 comments on commit c77a799

Please sign in to comment.