Skip to content

Latest commit

 

History

History
53 lines (40 loc) · 1.64 KB

02-create-toot-together-workflow.md

File metadata and controls

53 lines (40 loc) · 1.64 KB

back to README.md

Create a .github/workflows/toot-together.yml file

In your repository, open the Actions tab.

Press the Setup a new workflow yourself button to open the file editor.

In the filename input above the code area, replace main.yml with toot-together.yml. Then replace the code:

on: [push, pull_request]
name: Toot, together!
jobs:
  preview:
    name: Preview
    runs-on: ubuntu-latest
    if: github.event_name == 'pull_request'
    steps:
      - uses: joschi/[email protected]
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  toot:
    name: Toot
    runs-on: ubuntu-latest
    if: github.event_name == 'push' && github.ref == 'refs/heads/master'
    steps:
      - name: checkout master
        uses: actions/checkout@v2
      - name: Toot
        uses: joschi/[email protected]
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          # URL to the instance hosting your Mastodon account
          MASTODON_URL: https://www.mastodon.example/
          MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}

Make sure to replace 'master' if you changed your repository's default branch.

To create the file, press the Start commit button. You can optionally set a custom commit message, then press Commit new file.


Nearly done! Shortly after creating or updating .github/workflows/toot-together.yml in your repository’s default branch, a pull request will be created with further instructions.

back to README.md