From d0b559c85b2f3b4010c0dd93a5f37b987e29b845 Mon Sep 17 00:00:00 2001 From: AleixMT Date: Thu, 22 Aug 2024 14:14:42 +0200 Subject: [PATCH] ADDED: adviser secret in workflow --- .github/workflows/buildAndSendSignatures.yml | 5 ++++- data/adviser.json | 2 -- src/sendEmails.sh | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/buildAndSendSignatures.yml b/.github/workflows/buildAndSendSignatures.yml index 71a50fd..2c9d861 100644 --- a/.github/workflows/buildAndSendSignatures.yml +++ b/.github/workflows/buildAndSendSignatures.yml @@ -44,7 +44,10 @@ env: ACTIVITIES_EMAIL: ${{ secrets.ACTIVITIES_EMAIL }} ACTIVITIES_POSITION: ${{ secrets.ACTIVITIES_POSITION }} ACTIVITIES_LINKEDIN: ${{ secrets.ACTIVITIES_LINKEDIN }} - + ADVISER_NAME: ${{ secrets.ADVISER_NAME }} + ADVISER_EMAIL: ${{ secrets.ADVISER_EMAIL }} + ADVISER_POSITION: ${{ secrets.ADVISER_POSITION }} + ADVISER_LINKEDIN: ${{ secrets.ADVISER_LINKEDIN }} jobs: build_and_send_signatures: runs-on: ubuntu-latest diff --git a/data/adviser.json b/data/adviser.json index ef81d69..8bdfb6e 100644 --- a/data/adviser.json +++ b/data/adviser.json @@ -5,5 +5,3 @@ "linkedin": "{{LINKEDIN}}" } - - diff --git a/src/sendEmails.sh b/src/sendEmails.sh index 0c91878..8511c4f 100644 --- a/src/sendEmails.sh +++ b/src/sendEmails.sh @@ -8,7 +8,7 @@ for signature in $@; do curl -v --url 'smtps://smtp.gmail.com:465' \ --ssl-reqd \ - --mail-from "<${EMAIL_USERNAME}>" \ + --mail-from "${EMAIL_USERNAME}" \ --mail-rcpt "${email_value}" \ --mail-rcpt "${EMAIL_USERNAME}" \ --user "${EMAIL_USERNAME}:${EMAIL_PASSWORD}" \ @@ -28,6 +28,6 @@ A -F "file=@${PROJECT_FOLDER}/out/${signature}.html;type=text/html;encoder=base64" \ -F '=)' \ -H "Subject: Actualització de signatures d'email" \ - -H "From: informatica@asbtec.cat" \ + -H "From: Informàtica ASBTEC " \ -H "To: ${EMAIL_USERNAME} <${EMAIL_USERNAME}>" done \ No newline at end of file