Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/withastro/automation
Centralized repo for GitHub actions for the `withastro` org
https://github.com/withastro/automation
Last synced: 3 months ago
JSON representation
Centralized repo for GitHub actions for the `withastro` org
- Host: GitHub
- URL: https://github.com/withastro/automation
- Owner: withastro
- License: mit
- Created: 2023-06-19T16:53:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-29T14:11:10.000Z (11 months ago)
- Last Synced: 2024-09-30T17:05:14.247Z (3 months ago)
- Homepage:
- Size: 35.2 KB
- Stars: 11
- Watchers: 16
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Astro Automation Tools
This repository contains GitHub Action workflows that are shared across repos in the `withastro` GitHub org.
> **Warning**
> These workflows are not designed for use _outside_ of the `withastro` GitHub org.## [`congratsbot.yml`](./.github/workflows/congratsbot.yml)
This workflow posts a celebratory message in a Discord channel of your choice for each commit. For example:
> ๐ **Merged!** Houston (Bot): [`[ci] release (#232)`](#)
> _Featuring contributions by github-actions[bot]! ๐_### Prerequisites
[Create a new Discord webhook](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks) and add the URL to your repository secrets as `DISCORD_WEBHOOK_CONGRATS`.
### Usage
```yml
name: Congratsboton:
push:
branches: [main]jobs:
congrats:
if: ${{ github.repository_owner == 'withastro' }}
uses: withastro/automation/.github/workflows/congratsbot.yml@main
secrets:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_CONGRATS }}
```### Optional inputs
You can customize the emojis and co-author message templates to give your repository its own personality. You can set these under `with` in your job:
```yml
jobs:
congrats:
if: ${{ github.repository_owner == 'withastro' }}
uses: withastro/automation/.github/workflows/congratsbot.yml@main
with:
EMOJIS: ๐ค,๐ป,๐ฑ
COAUTHOR_TEMPLATES: >
[
"Woahhh, really gave us a fright! ๐",
"We werenโt sure what we were doing until showed up. ๐ค"
]
secrets:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_CONGRATS }}
```#### `EMOJIS`
**default:** `๐,๐,๐งโ๐,๐ฅณ,๐,๐`
A comma-delimited set of emojis.
Each congrats bot message will pick one at random for the start of the message.#### `COAUTHOR_TEMPLATES`
**default:** see [`congratsbot.yml`](./.github/workflows/congratsbot.yml#L31)
A JSON array of co-author recognition templates.
Each template should contain the `` placeholder to be replaced by the names of one or more co-authors for this commit.
(Ignored for commits without any co-authors.)When writing congrats messages, remember that `` could be one, two, or more names. So, create messages that can work for both a single co-author and for several people, for example, "This PR was made even better by ``!"
## [`format.yml`](./.github/workflows/format.yml)
This workflow runs a repositoryโs code formatting tooling (e.g. Prettier) and commits any resulting changes directly.
### Usage
```yml
name: Formaton:
workflow_dispatch:
push:
branches:
- mainjobs:
prettier:
if: github.repository_owner == 'withastro'
uses: withastro/automation/.github/workflows/format.yml@main
with:
# Set command to this repositoryโs package script that runs Prettier
command: 'format:ci'
secrets: inherit
```## [`lockfile.yml`](./.github/workflows/lockfile.yml)
This workflow updates a repositoryโs `pnpm-lock.yaml` and opens a PR with the changes if there are any.
### Usage
```yml
name: Nightlyon:
workflow_dispatch:
schedule:
# Run every Monday at 12:00 UTC
- cron: '0 12 * * 1'jobs:
lockfile:
if: github.repository_owner == 'withastro'
uses: withastro/automation/.github/workflows/lockfile.yml@main
secrets: inherit
```