{"id":13998436,"url":"https://github.com/azu/rss-to-twitter","last_synced_at":"2025-04-30T17:26:02.542Z","repository":{"id":169969774,"uuid":"646050839","full_name":"azu/rss-to-twitter","owner":"azu","description":"GitHub Actions: RSS to Twitter","archived":false,"fork":false,"pushed_at":"2024-04-04T23:14:28.000Z","size":17959,"stargazers_count":42,"open_issues_count":3,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-19T07:47:04.144Z","etag":null,"topics":["github","github-actions","github-pages","rss","tweets","twitter"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/azu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"azu"}},"created_at":"2023-05-27T06:04:00.000Z","updated_at":"2025-04-16T20:36:31.000Z","dependencies_parsed_at":"2024-01-15T19:44:59.946Z","dependency_job_id":"17d5f062-84d0-4dd8-9c4c-2187df5967ca","html_url":"https://github.com/azu/rss-to-twitter","commit_stats":null,"previous_names":["azu/rss-to-twitter"],"tags_count":27,"template":false,"template_full_name":"technote-space/gh-actions-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azu%2Frss-to-twitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azu%2Frss-to-twitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azu%2Frss-to-twitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azu%2Frss-to-twitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/azu","download_url":"https://codeload.github.com/azu/rss-to-twitter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251750195,"owners_count":21637685,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","github-actions","github-pages","rss","tweets","twitter"],"created_at":"2024-08-09T19:01:40.338Z","updated_at":"2025-04-30T17:26:02.505Z","avatar_url":"https://github.com/azu.png","language":"TypeScript","funding_links":["https://github.com/sponsors/azu"],"categories":["TypeScript"],"sub_categories":[],"readme":"# RSS To Twitter\n\n[![CI Status](https://github.com/azu/rss-to-twitter/workflows/CI/badge.svg)](https://github.com/azu/rss-to-twitter/actions)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/azu/rss-to-twitter/blob/master/LICENSE)\n\nGitHub Actions post twitter from RSS Feeds.\n\n## Post Steps\n\n1. Fetch RSS Feeds\n2. Filter feed items by publish time\n3. Post to twitter.\n\nIf your action uses `on.schedule.cron`, filter feed items by publish time compare to previous cron execution time.\nIf your action uses other events like `on.push`, you need to set `UPDATE_WITHIN_MINUTES` option.\n\n## Usage\n\n### Prepare Twitter API Keys\n\n1. Create Twitter App - \u003chttps://developer.twitter.com/en/portal/dashboard\u003e\n2. Change your app permission to `Read and Write`\n  - ![ss 1](docs/img.png)\n  - ![ss 2](docs/img_1.png)\n3. Get API Key/API Key Secret and Access Token/Access Token Secret\n   - ![Twitter APIKEY](docs/apikey.png)\n   - `TWITTER_APIKEY` and `TWITTER_APIKEY_SECRET`\n   - ![Twitter ACCESS TOKEN](docs/accesstoken.png)\n   - `TWITTER_ACCESS_TOKEN` and `TWITTER_ACCESS_TOKEN_SECRET`\n   - :warning: Check \"Created with **Read and Write** permissions\" on your app page.\n4. Add these keys to GitHub Secrets\n   - `TWITTER_APIKEY`\n   - `TWITTER_APIKEY_SECRET`\n   - `TWITTER_ACCESS_TOKEN`\n   - `TWITTER_ACCESS_TOKEN_SECRET`\n\n:memo: Bearer Token is not needed.\n\n### On schedule\n\nPost new feed item via schedule cron every 15 minutes.\n\n```yaml\nname: rss-to-twitter\non:\n  schedule:\n    # every 15 minutes\n    - cron: \"*/15 * * * *\"\n  workflow_dispatch:\njobs:\n  twitter:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: azu/rss-to-twitter@v2\n        with:\n          # RSS feed URL\n          RSS_URL: \"https://hnrss.org/newest\"\n          TWEET_TEMPLATE: 'New Post: \"%title%\" %url%'\n          UPDATE_WITHIN_MINUTES: 15 # for workflow_dispatch\n          TWITTER_APIKEY: ${{ secrets.TWITTER_APIKEY }}\n          TWITTER_APIKEY_SECRET: ${{ secrets.TWITTER_APIKEY_SECRET }}\n          TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}\n          TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}\n```\n\n\u003e **Note**: filter feed items by publish time compare to previous cron execution time.\n\n### On Page build\n\nPost new feed item via GitHub Pages Build event.\n\n```yaml\nname: rss-to-twitter\non:\n  page_build\njobs:\n  twitter:\n    # if github.event.build.error.message is not null, it means that the build failed. Skip it\n    if: ${{ github.event.build.error.message == null }}\n    runs-on: ubuntu-latest\n    steps:\n      - uses: azu/rss-to-twitter@v2\n        with:\n          RSS_URL: \"https://you.github.io/feed.xml\"\n          TWEET_TEMPLATE: 'New Post: \"%title%\" %url%'\n          UPDATE_WITHIN_MINUTES: 15 # post items that are published within 15 minutes\n          TWITTER_APIKEY: ${{ secrets.TWITTER_APIKEY }}\n          TWITTER_APIKEY_SECRET: ${{ secrets.TWITTER_APIKEY_SECRET }}\n          TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}\n          TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}\n```\n\n- Example:\n  - Workflow: https://github.com/ecmascript-daily/ecmascript-daily.github.com/blob/master/.github/workflows/rss-to-twitter.yml\n  - Twitter: https://twitter.com/EcmascriptDaily/\n\n\u003e **Note**: filter feed items by publish time within 15 minutes.\n\n\u003e **Warning**: If you deploy your site by GitHub Actions, you need to use Personal Access Token instead of `${{ secrets. GITHUB_TOKEN }}`. `${{ secrets. GITHUB_TOKEN }}` can not trigger `page_build` event. It is limitation of GitHub Actions's `${{ secrets. GITHUB_TOKEN }}`.\n\n- [Automatic token authentication - GitHub Docs](https://docs.github.com/en/enterprise-server@2.22/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow)\n- [github actions - Push event doesn't trigger workflow on push paths - Stack Overflow](https://stackoverflow.com/questions/67550727/push-event-doesnt-trigger-workflow-on-push-paths)\n\nInstead of It, you can use Personal Access Token for deploy, and it triggers `page_build` event.\n\n- Example:\n  - Deploy Workflow: https://github.com/jser/jser.github.io/blob/a0fcfc6ef3829055ee10807009d04fb6431a4daf/.github/workflows/deploy.yml#L26-L35\n  - RSS to Twitter Workflow:https://github.com/jser/jser.github.io/blob/a0fcfc6ef3829055ee10807009d04fb6431a4daf/.github/workflows/rss-to-twitter.yml\n  - Twitter:https://twitter.com/jser_info\n\n## TWEET_TEMPLATE\n\n- `%title%`: Item title\n- `%url`: Item url\n- `%desc%`: Item content snip(max 280 charaters)\n\n## Release Flow\n\n1. Tag to `v*` on Release Pages\n2. CI build action and push it\n\n## License\n\nMIT\n\n----\n\n## Table of Contents\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n- [Setup](#setup)\n  - [yarn](#yarn)\n  - [npm](#npm)\n- [Workflows](#workflows)\n  - [ci.yml](#ciyml)\n  - [add-version-tag.yml](#add-version-tagyml)\n  - [toc.yml](#tocyml)\n  - [issue-opened.yml](#issue-openedyml)\n  - [pr-opened.yml](#pr-openedyml)\n  - [pr-updated.yml](#pr-updatedyml)\n  - [project-card-moved.yml](#project-card-movedyml)\n  - [broken-link-check.yml](#broken-link-checkyml)\n  - [update-dependencies.yml](#update-dependenciesyml)\n  - [add-test-tag.yml](#add-test-tagyml)\n  - [Secrets](#secrets)\n- [Test release](#test-release)\n- [Helpers](#helpers)\n- [Author](#author)\n\n\u003c/details\u003e\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## Setup\n### yarn\n- `yarn setup`\n### npm\n- `npm run setup`\n\n## Workflows\n\nSome `workflows` are included by default.  \n\n### ci.yml\nCI Workflow\n\n1. ESLint\n1. Jest\n   - Send coverage report to codecov if `CODECOV_TOKEN` is set.\n1. Release GitHub Actions\n   - if tag is added.\n1. Publish package\n   - if tag is added and `NPM_AUTH_TOKEN` is set.\n1. Publish release\n   - if 3 and 4 jobs are succeeded.\n1. Notify by slack\n   - if workflow is failure\n\n[ACCESS_TOKEN](#access_token) is required.  \n[SLACK_WEBHOOK_URL](#slack_webhook_url) is required.  \n\n### add-version-tag.yml\nAdd the release tag when pull request is merged.\n\n1. Get next version from commits histories.  \n   see [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)\n1. Add tag.\n1. Create branch for next version.\n\n[ACCESS_TOKEN](#access_token) is required.\n\n### toc.yml\nCreate TOC (Table of contents)\n\n[ACCESS_TOKEN](#access_token) is required.\n\n### issue-opened.yml\n- Assign the issue to project  \n   default setting:  \n   ```\n   Project: Backlog\n   Column: To do\n   ```\n- Assign author to issue\n\n### pr-opened.yml\n- Assign the PR to project  \n   default setting:  \n   ```\n   Project: Backlog\n   Column: In progress\n   ```\n   [ACCESS_TOKEN](#access_token) is required.\n- Assign author to PR\n- Add labels by branch  \n   [setting](.github/pr-labeler.yml)\n\n### pr-updated.yml\n- Add labels by changed files\n   [setting](.github/labeler.yml)\n- Create PR histories\n- Manage PR by release type  \n   [ACCESS_TOKEN](#access_token) is required.\n- Check version in package.json  \n   [ACCESS_TOKEN](#access_token) is required.\n- Check if it can be published to npm  \n   if `NPM_AUTH_TOKEN` is set\n\n### project-card-moved.yml\nManage labels by moving project cards\n\n### broken-link-check.yml\nCheck broken link in README\n\n### update-dependencies.yml\nUpdate package dependencies\n\n- schedule\n- PR opened, closed\n- repository dispatch\n\n### add-test-tag.yml\nAdd tag for test release\n\n### Secrets\n#### ACCESS_TOKEN\n[Personal access token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) with the public_repo or repo scope  \n(repo is required for private repositories)\n\n#### SLACK_WEBHOOK_URL\nhttps://api.slack.com/messaging/webhooks\n\n## Test release\n[![azu/release-github-actions-cli - GitHub](https://gh-card.dev/repos/azu/release-github-actions-cli.svg)](https://github.com/azu/release-github-actions-cli)\n\n1. Create `.env`  \n   Set [Personal access token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)\n   ```dotenv\n   token=1234567890abcdef1234567890abcdef12345678\n   ```\n1. Run `yarn release`\n   - Dry run: `yarn release -n`\n   - Help: `yarn release -h`\n\n![cli](https://github.com/azu/rss-to-twitter/raw/images/cli.gif)\n\nThen, you can use your `GitHub Actions` like follows:\n\n```yaml\non: push\nname: Test\njobs:\n  toc:\n    name: Test\n    runs-on: ubuntu-latest\n    steps:\n      - uses: owner/repo@gh-actions\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazu%2Frss-to-twitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazu%2Frss-to-twitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazu%2Frss-to-twitter/lists"}