From c77a7992e7bfbbe06cba9709c4f6bbf8188b0f46 Mon Sep 17 00:00:00 2001 From: SKairinos Date: Fri, 5 Jan 2024 17:12:12 +0000 Subject: [PATCH] output email address --- .github/workflows/validate-new-contributor.yaml | 15 +++++++++++---- .github/workflows/verify-new-contributor.yaml | 4 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/validate-new-contributor.yaml b/.github/workflows/validate-new-contributor.yaml index 7e65033c..4f3e7a4e 100644 --- a/.github/workflows/validate-new-contributor.yaml +++ b/.github/workflows/validate-new-contributor.yaml @@ -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 @@ -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" diff --git a/.github/workflows/verify-new-contributor.yaml b/.github/workflows/verify-new-contributor.yaml index 385e501d..d7e02188 100644 --- a/.github/workflows/verify-new-contributor.yaml +++ b/.github/workflows/verify-new-contributor.yaml @@ -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: @@ -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