{"id":13484565,"url":"https://github.com/actions-ecosystem/recipes","last_synced_at":"2025-10-05T19:56:31.293Z","repository":{"id":103094338,"uuid":"261894452","full_name":"actions-ecosystem/recipes","owner":"actions-ecosystem","description":"📝 Example recipes for Actions Ecosystem's GitHub Actions","archived":false,"fork":false,"pushed_at":"2022-03-19T14:04:03.000Z","size":668,"stargazers_count":23,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-05T19:56:30.505Z","etag":null,"topics":["actions","github"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/actions-ecosystem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-05-06T22:40:56.000Z","updated_at":"2025-02-28T15:24:54.000Z","dependencies_parsed_at":"2023-04-12T10:23:58.472Z","dependency_job_id":null,"html_url":"https://github.com/actions-ecosystem/recipes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/actions-ecosystem/recipes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-ecosystem%2Frecipes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-ecosystem%2Frecipes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-ecosystem%2Frecipes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-ecosystem%2Frecipes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/actions-ecosystem","download_url":"https://codeload.github.com/actions-ecosystem/recipes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions-ecosystem%2Frecipes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278510918,"owners_count":25998997,"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","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["actions","github"],"created_at":"2024-07-31T17:01:26.231Z","updated_at":"2025-10-05T19:56:31.270Z","avatar_url":"https://github.com/actions-ecosystem.png","language":null,"readme":"# Recipes\n\n[![license][license-badge]][license]\n\nThis repository contains some use cases of workflows with [Actions Ecosystem](https://github.com/actions-ecosystem)'s GitHub Actions.\n\nActions Ecosystem's actions are designed to do one thing well as Unix Philosophy.\nThat's why it's further better to use an action with other actions.\n\nLet's say we want a workflow that lints source code and send the result to Slack channel.\nIn this case, we prefer to use a `lint action` and a `Slack action`, rather than a `lint and Slack action`.\nThis is because if we use a `lint and Slack action` and want a workflow that *tests* source code and send the result to Slack channel then we need to develop the same Slack notification logic again.\nWe prefer to use GitHub Actions' output parameters that work as pipelines between actions.\nAnd also, even if you prefer to use an action not in Actions Ecosystem in your workflow, some of Actions Ecosystem's actions help you as a part of your workflow.\n\nIf you're not so familiar with GitHub Actions, first of all you may want to read [GitHub Actions Documentation](https://help.github.com/en/actions).\n\nIf you're interested in the latest ones, explore `.github/workflows` in Actions Ecosystem's repositories.\n\n## Automate updating a Git tag with semver and creating a GitHub release\n\nThis workflow automates updating a Git tag and creating a GitHub release with only adding a *release label* and optionally a *release note* after a pull request has been merged.\n\n![screenshot](./docs/assets/screenshot-release-pull-request.png)\n![screenshot](./docs/assets/screenshot-release-release.png)\n\n\u003cdetails\u003e\n\u003csummary\u003eConfiguration\u003c/summary\u003e\n\n1. [actions-ecosystem/action-get-merged-pull-request](https://github.com/actions-ecosystem/action-get-merged-pull-request) gets a pull request merged with the base branch.\n2. [actions-ecosystem/action-release-label](https://github.com/actions-ecosystem/action-release-label) gets a semver update level from a *release label*.\n3. [actions-ecosystem/action-get-latest-tag](https://github.com/actions-ecosystem/action-get-latest-tag) fetches the latest Git tag in the repository.\n4. [actions-ecosystem/action-bump-semver](https://github.com/actions-ecosystem/action-bump-semver) bumps up the Git tag previously fetched based on the semver update level at the step *1*.\n5. *[Optional]* [actions-ecosystem/action-regex-match](https://github.com/actions-ecosystem/action-regex-match) extracts a *release note* from the pull request body.\n6. [actions-ecosystem/action-push-tag](https://github.com/actions-ecosystem/action-push-tag) pushes the bumped Git tag with the pull request reference as a message.\n7. [actions/create-release](https://github.com/actions/create-release) creates a GitHub release with the Git tag and the *release note* when the semver update level is *major* or *minor*.\n8. *[Optional]* [actions-ecosystem/action-create-comment](https://github.com/actions-ecosystem/action-create-comment) creates a comment that reports the new GitHub release.\n\nFor further details, see each action document.\n\n```yaml\nname: Create Release\n\non:\n  push:\n    branches:\n      - master\n\njobs:\n  release:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n\n      - uses: actions-ecosystem/action-get-merged-pull-request@v1\n        id: get-merged-pull-request\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n\n      - uses: actions-ecosystem/action-release-label@v1\n        id: release-label\n        if: ${{ steps.get-merged-pull-request.outputs.title != null }}\n        with:\n          labels: ${{ steps.get-merged-pull-request.outputs.labels }}\n\n      - uses: actions-ecosystem/action-get-latest-tag@v1\n        id: get-latest-tag\n        if: ${{ steps.release-label.outputs.level != null }}\n        with:\n          semver_only: true\n\n      - uses: actions-ecosystem/action-bump-semver@v1\n        id: bump-semver\n        if: ${{ steps.release-label.outputs.level != null }}\n        with:\n          current_version: ${{ steps.get-latest-tag.outputs.tag }}\n          level: ${{ steps.release-label.outputs.level }}\n\n      - uses: actions-ecosystem/action-regex-match@v2\n        id: regex-match\n        if: ${{ steps.bump-semver.outputs.new_version != null }}\n        with:\n          text: ${{ steps.get-merged-pull-request.outputs.body }}\n          regex: '```release_note([\\s\\S]*)```'\n\n      - uses: actions-ecosystem/action-push-tag@v1\n        if: ${{ steps.bump-semver.outputs.new_version != null }}\n        with:\n          tag: ${{ steps.bump-semver.outputs.new_version }}\n          message: \"${{ steps.bump-semver.outputs.new_version }}: PR #${{ steps.get-merged-pull-request.outputs.number }} ${{ steps.get-merged-pull-request.outputs.title }}\"\n\n      - uses: actions/create-release@v1\n        if: ${{ steps.release-label.outputs.level == 'major' || steps.release-label.outputs.level == 'minor' }}\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        with:\n          tag_name: ${{ steps.bump-semver.outputs.new_version }}\n          release_name: ${{ steps.bump-semver.outputs.new_version }}\n          body: ${{ steps.regex-match.outputs.group1 }}\n\n      - uses: actions-ecosystem/action-create-comment@v1\n        if: ${{ steps.bump-semver.outputs.new_version != null }}\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          number: ${{ steps.get-merged-pull-request.outputs.number }}\n          body: |\n            The new version [${{ steps.bump-semver.outputs.new_version }}](https://github.com/${{ github.repository }}/releases/tag/${{ steps.bump-semver.outputs.new_version }}) has been released :tada:\n```\n\n\u003c/details\u003e\n\n## Check release status\n\nThis workflow tells you what version will be released with the pull request.\n\n*It requires the [release workflow](#automate-updating-a-git-tag-with-semver-and-creating-a-github-release) above.*\n\n![screenshot](./docs/assets/screenshot-check-release-comment.png)\n\n\u003cdetails\u003e\n\u003csummary\u003eConfiguration\u003c/summary\u003e\n\n```yaml\nname: Check Release\n\non:\n  pull_request:\n    types:\n      - labeled\n\njobs:\n  release:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n\n      - uses: actions-ecosystem/action-release-label@v1\n        id: release-label\n        if: ${{ startsWith(github.event.label.name, 'release/') }}\n\n      - uses: actions-ecosystem/action-get-latest-tag@v1\n        id: get-latest-tag\n        if: ${{ steps.release-label.outputs.level != null }}\n        with:\n          semver_only: true\n\n      - uses: actions-ecosystem/action-bump-semver@v1\n        id: bump-semver\n        if: ${{ steps.release-label.outputs.level != null }}\n        with:\n          current_version: ${{ steps.get-latest-tag.outputs.tag }}\n          level: ${{ steps.release-label.outputs.level }}\n\n      - uses: actions-ecosystem/action-create-comment@v1\n        if: ${{ steps.bump-semver.outputs.new_version != null }}\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          body: |\n            This PR will update [${{ github.repository }}](https://github.com/${{ github.repository }}) from [${{ steps.get-latest-tag.outputs.tag }}](https://github.com/${{ github.repository }}/releases/tag/${{ steps.get-latest-tag.outputs.tag }}) to ${{ steps.bump-semver.outputs.new_version }} :rocket:\n\n            If this update isn't as you expected, you may want to change or remove the *release label*.\n```\n\n\u003c/details\u003e\n\n## Add suitable labels to a issue based on the information\n\nThis workflow adds a `help wanted` label to an issue whose title matches the regex `help|not work`.\n\n![screenshot](./docs/assets/screenshot-add-label-based-on-issue.png)\n\n\u003cdetails\u003e\n\u003csummary\u003eConfiguration\u003c/summary\u003e\n\n```yaml\nname: Mark Issue with Help Wanted\n\non:\n  issues:\n    types:\n      - opened\n      - edited\n      - reopened\n\njobs:\n  release:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n\n      - uses: actions-ecosystem/action-regex-match@v2\n        id: regex-match\n        with:\n          text: ${{ github.event.issue.title }}\n          regex: \"help|not work\"\n          flags: 'gi'\n\n      - uses: actions-ecosystem/action-add-labels@v1\n        if: ${{ steps.regex-match.outputs.match != '' }}\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          labels: 'help wanted'\n```\n\n\u003c/details\u003e\n\n## Propagate mentions from GitHub to Slack\n\n![screenshot](./docs/assets/screenshot-propagate-mention-github.png)\n![screenshot](./docs/assets/screenshot-propagate-mention-slack.png)\n\n\u003cdetails\u003e\n\u003csummary\u003eConfiguration\u003c/summary\u003e\n\n```yaml\nname: Propagate Mentions\n\non:\n  issue_comment:\n    types:\n      - created\n\njobs:\n  notify:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions-ecosystem/action-regex-match@v2\n        id: regex-match\n        with:\n          regex: '^\\/cc(( +@[-\\w]+)+)\\s*$'\n          text: ${{ github.event.comment.body }}\n          flags: 'gm'\n\n      - uses: actions-ecosystem/action-slack-notifier@v1\n        if: ${{ steps.regex-match.outputs.match != '' }}\n        with:\n          slack_token: ${{ secrets.SLACK_TOKEN }}\n          message: |\n            ${{ steps.regex-match.outputs.match }}\n          channel: develop\n          color: blue # optional\n          verbose: true # optional\n```\n\n\u003c/details\u003e\n\n## Lint the title of a pull request\n\nThis workflow lints the title of a pull request.\n\n![screenshot](./docs/assets/screenshot-lint-pull-request-title.png)\n\n\u003cdetails\u003e\n\u003csummary\u003eConfiguration\u003c/summary\u003e\n\n```yaml\nname: Lint Pull Request Title\n\non:\n  pull_request:\n    types:\n      - opened\n      - edited\n      - reopened\n\njobs:\n  lint:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n\n      - uses: actions-ecosystem/action-regex-match@v2\n        id: regex-match\n        with:\n          text: ${{ github.event.pull_request.title }}\n          regex: '(?:add|update|fix)\\([a-z]+\\):\\s.+'\n\n      - uses: actions-ecosystem/action-create-comment@v1\n        if: ${{ steps.regex-match.outputs.match == '' }}\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          body: |\n            :warning: The title of this PR is invalid.\n\n            Please make the title match the regex `(?:add|update|fix)\\([a-z]+\\):\\s.+`.\n\n            e.g.) `add(cli): enable --verbose flag`, `fix(api): avoid unexpected error in handler`\n\n      - uses: actions-ecosystem/action-add-labels@v1\n        if: ${{ steps.regex-match.outputs.match == '' }}\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          labels: 'invalid/title'\n\n      - run: exit 1\n        if: ${{ steps.regex-match.outputs.match == '' }}\n```\n\n\u003c/details\u003e\n\n## Automatically assign the user who creates an issue or a pull request\n\n![screenshot](./docs/assets/screenshot-assign-automatically.png)\n\n\u003cdetails\u003e\n\u003csummary\u003eConfiguration\u003c/summary\u003e\n\n```yaml\nname: Auto Assign\n\non:\n  pull_request:\n    types:\n      - opened\n      - reopened\n\njobs:\n  add_labels:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions-ecosystem/action-add-assignees@v1\n        with:\n          github_token: ${{ secrets.github_token }}\n          assignees: ${{ github.actor }}\n```\n\n\u003c/details\u003e\n\n## License\n\nCopyright 2020 The Actions Ecosystem Authors.\n\n\u003c!-- badge links --\u003e\n\n[license]: LICENSE\n[license-badge]: https://img.shields.io/github/license/actions-ecosystem/action-add-labels?style=for-the-badge\n","funding_links":[],"categories":["Others"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factions-ecosystem%2Frecipes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factions-ecosystem%2Frecipes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factions-ecosystem%2Frecipes/lists"}