Giter Club home page Giter Club logo

automation's Introduction

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.

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 and add the URL to your repository secrets as DISCORD_WEBHOOK_CONGRATS.

Usage

name: Congratsbot

on:
  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:

jobs:
  congrats:
    if: ${{ github.repository_owner == 'withastro' }}
    uses: withastro/automation/.github/workflows/congratsbot.yml@main
    with:
      EMOJIS: 🤖,👻,😱
      COAUTHOR_TEMPLATES: >
        [
          "Woahhh, <names> really gave us a fright! 🎃",
          "We weren’t sure what we were doing until <names> 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

A JSON array of co-author recognition templates. Each template should contain the <names> 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 <names> 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 <names>!"

This workflow runs a repository’s code formatting tooling (e.g. Prettier) and commits any resulting changes directly.

Usage

name: Format

on:
  workflow_dispatch:
  push:
    branches:
      - main

jobs:
  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

This workflow updates a repository’s pnpm-lock.yaml and opens a PR with the changes if there are any.

Usage

name: Nightly

on:
  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

automation's People

Contributors

delucis avatar mandar1jn avatar martrapp avatar natemoo-re avatar princesseuh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.