상현에 하루하루
개발자의 하루

github action things3

( 업데이트: )

나는 TODO앱중에 Things3를 사용해서 할 일들을 정리하고 해결한다. 그중에 개발과 관련된 할 일들은 깃허브에 이슈로 관리하는데 이슈를 Things3에도 할일로 추가하고싶다는 생각에 시작하게 되었다.

사실 워크플로우를 만들수있는 zapier 같은 서비스를 사용하면 되지만…

  • 비싼 가격
  • 최대 생성가능한 워크플로우 갯수
  • 하루에 최대 사용할 수 있는 사이클?

정해져 있기 때문에 나중을 생각해서 github action으로 만들기로했다!

워크플로우는 zapier와 동일하게 구성하려한다.

things3에서 제공해주는 email을 동해서 자동적으로 to-do를 생성하는 것!

https://github.com/marketplace/actions/send-email 이 워크플로우를 사용해서 이메일 발송을 할 것이다!!

name: "create Things3 to-do"

on:
  issues:
    types: [assigned]

jobs:
  test:
    if: ${{ (github.repository_owner == 'beeclover' || github.repository_owner == 'Hansanghyeon')}} && ${{github.event.issues.assigned == 'Hansanghyeon' }}
    runs-on: ubuntu-latest
    steps:
      - name: Send mail
        uses: <a href="https://github.com/dawidd6/action-send-mail">dawidd6/action-send-mail@</a>v2
        with:
          server_address: smtp.gmail.com
          server_port: 465
          username: ${{secrets.MAIL_USERNAME}}
          password: ${{secrets.MAIL_PASSWORD}}
          subject: ${{ github.event.issue.title }}
          body: | 
            Link: ${{github.event.issue.url}}
            ${{github.event.issue.body}}
          to: ${{secrets.MAIL_TO}}
          from: 999@hyeon.pro # <user@example.com>
          # Optional content type (defaults to text/plain):
          content_type: text/plain
          # Optional converting Markdown to HTML (set content_type to text/html too):
          # convert_markdown: true
          # Optional attachments:
          # attachments: attachments.zip,git.diff,./dist/static/main.jsCode language: PHP (php)

참고