Skip to content

feat: introducing Mastodon Send GitHub Action v2: Enhanced Features and Customizations #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 2, 2024

Conversation

cbrgm
Copy link
Owner

@cbrgm cbrgm commented Feb 2, 2024

Overview

The Mastodon Send GitHub Action has been upgraded to v2, introducing a suite of enhancements and new features aimed at providing a more versatile and user-friendly experience for automating Mastodon toots via GitHub Actions. Building on the solid foundation of v1, this latest version extends functionality while maintaining ease of use and flexibility in integrating Mastodon into your CI/CD pipelines.

What's New in v2

Extended Input Parameters

  • Enhanced Visibility Control: Alongside the existing public, unlisted, private, and direct visibility options, v2 defaults to public if no visibility is specified, ensuring your messages reach the audience you intend without extra configuration.
  • Sensitive Content Handling: Mark toots as sensitive with the new sensitive input, protecting viewers from potential spoilers or sensitive material.
  • Spoiler Text Addition: Accompany sensitive toots with spoiler-text, providing a content warning that precedes the main message.
  • Language Specification: Define the toot's language with the language input, aiding in content categorization and enhancing accessibility.
  • Scheduled Toots: Plan your communications by scheduling toots for future publication using the scheduled-at input, formatted in ISO 8601 for precision and clarity.

Improved Outputs for Enhanced Integrations

  • Outputs have been expanded to include id, url, and scheduled_at of the posted toot, facilitating further actions or integrations within your workflows.

Container Support

  • v2 can be executed independently within a container, offering greater flexibility for different CI/CD setups: podman run --rm -it ghcr.io/cbrgm/mastodon-github-action:v2 --help.

GoLang Enhancements

  • The action is now backed by Go's latest best practices, including improved error handling.

Simplified Workflow Configuration

  • The workflow syntax has been streamlined, making it easier to configure the action with less boilerplate code.

Workflow Usage Example

- name: Send toot to Mastodon with additional options
  uses: cbrgm/mastodon-github-action@v2
  with:
    access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }}
    url: ${{ secrets.MASTODON_URL }}
    message: "Check out our latest update."
    visibility: "unlisted"
    sensitive: true
    spoiler-text: "Latest Update"
    language: "en"
    scheduled-at: "2024-01-01T00:00:00Z"

@cbrgm cbrgm merged commit e257325 into main Feb 2, 2024
@cbrgm cbrgm deleted the go-rewrite branch February 2, 2024 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant