smtp2workflow

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2022 License: MIT Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

smtp2workflow

SMTP to GitHub Actions workflow Relay.

version: "3"
services:
  smtp2workflow:
    restart: always
    image: ghcr.io/josh/smtp2workflow
    ports:
      - "25:25"
    environment:
      - SMTP2WORKFLOW_DOMAIN=example.com
      - SMTP2WORKFLOW_CODE=d039b5
      - SMTP2WORKFLOW_GITHUB_TOKEN=ghp_123abc
      - SMTP2WORKFLOW_REPOSITORY_TEST=owner/repo
      - SMTP2WORKFLOW_WORKFLOW_TEST=email.yml

Will forward mail to d039b5+test@example.com as a workflow dispatch event on the owner/repo repository. The raw email is passed as a git blob SHA to work around dispatch event input size limits.

Here's an example workflow that receives the email payload.

name: Email

on:
  workflow_dispatch:
    inputs:
      email_sha:
        description: "Email Blob SHA"

jobs:
  process:
    runs-on: ubuntu-latest

    steps:
      - name: Fetch email blob
        run: |
          gh api --jq '.content | @base64d' "/repos/$REPOSITORY/git/blobs/$FILE_SHA" >input.eml
        env:
          GITHUB_TOKEN: ${{ github.token }}
          REPOSITORY: ${{ github.repository }}
          FILE_SHA: ${{ github.event.inputs.email_sha }}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL