udondan/iam-floyd

View on GitHub
.github/workflows/toot.yml

Summary

Maintainability
Test Coverage
---
name: Toot IAM changes

on:
  release:
    types: [published]
  workflow_dispatch:
    inputs:
      changelog:
        description: version to toot about
        required: true

jobs:
  toot:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v4
        with:
          persist-credentials: false
          fetch-depth: 0

      - name: Setup node
        uses: actions/setup-node@v4
        with:
          node-version: 20.x

      - name: Toot latest version
        run: make toot
        if: ${{ github.event_name == 'release' }}
        env:
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          AWS_SQS_URL: ${{ secrets.AWS_SQS_URL_MASTODON }}

      - name: Toot specified version
        run: make toot
        if: ${{ github.event_name == 'workflow_dispatch' }}
        env:
          CHANGELOG: ${{ github.event.inputs.changelog }}
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          AWS_SQS_URL: ${{ secrets.AWS_SQS_URL_MASTODON }}