Skip to content

Release News Workflow #882

Release News Workflow

Release News Workflow #882

Workflow file for this run

name: Release News Workflow
on:
# Allow manually starting the workflow incase we need human intervention.
workflow_dispatch:
# Runs at 08:17 UTC / 00:17 PST / 01:17 PDT
# 17 is an arbitrarily chosen to avoid running the workflow during the peak at the beginning of the hour
schedule:
- cron: '17 8 * * *'
permissions: write-all
jobs:
generate_news_items:
# If this is running in a fork, only run if manually dispatched.
if: github.repository == 'amazon-ion/ion-docs' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Generate News Posts
id: generate_news
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./_scripts/generate_release_news.sh
- name: Commit and Push Changes
if: ${{ steps.generate_news.outputs.changes > 0 }}
run: |
git config user.name github-actions
git config user.email [email protected]
git commit -m "${{ steps.generate_news.outputs.generated_commit_message }}"
git push