👨‍💻
wiki - owain.codes
  • 💻 Welcome
  • Coding
    • Tips / How-to
      • Where is the hosts file on Windows?
      • Wrapped up a site
    • Snippets
      • Non-coding
        • TinyMCE config generator for Umbraco
        • Git Markdown
        • Command Prompt / Terminal
      • 👨‍💻Coding
        • Compile FrontEnd via NVM and Gulp
        • Node-Sass
        • SQL Statements
        • Build up SQL statements
        • Get current logged in user from Controller
        • Dynamic BlockList Label
        • Alt Tag
    • Umbraco
      • Luke - Version helper
      • Umbraco 10+
        • Find out Model of Current page
        • error NU1301: Unable to load the service index for source
      • Umbraco 9
        • Get the current page content type alias
      • Fluent SQL
      • Unable to open ConfigSource file
      • Delete items from backoffice by DocType ID
      • [WIP] Setting up Examine
      • Umbraco.ModelsBuilder assembly error
      • Working with IPublishedContent
      • How to Strongly Type to Models
      • Setting up a custom form
      • Getting bounced away from /umbraco
      • Examine
        • Explaining GroupedOr / GroupedAnd methods
      • Rosyln error
      • Models Builder Settings
      • Adding content to the backoffice
      • Pagination
      • Creating YYYY/MM folders
      • Configuration Error - CodeDom
    • C Sharp
      • Useful Links
      • Regex
      • Null check .any()
      • internal static and internal const
      • Dependency Injection
      • Dictionary<Tkey, TValue>
      • Linq / Lambda
  • Git
    • Git Actions
      • Build your own Git Action
      • Create a readme file automatically
    • Command line
      • Unstage a file
      • Ignore web.config changes on commit
      • Allow for case-insensitivity in Windows
      • Making VSCode your Git editor and diff tool
      • Add, Push, Pull, Clone
      • Make Terminal look nice
    • Conventional Commit
Powered by GitBook
On this page

Was this helpful?

  1. Git
  2. Git Actions

Create a readme file automatically

This job runs on the 0th, 6th, 12th, 18th hour of the day e.g. midnight, 6am, midday 6pm. To run it on the hour, every hour, just change the value to /1

name: Update README

on:
  push:
  schedule:
    - cron: "0 */6 * * *"

jobs:
  markscribe:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master

      - uses: muesli/readme-scribe@master
        env:
          GITHUB_TOKEN: ${{ secrets.GITBOOK_TOKEN }}
        with:
          template: "templates/README.md.tpl"
          writeTo: "README.md"

      - uses: actions/upload-artifact@v1
        with:
          name: README.md
          path: README.md

      - uses: stefanzweifel/git-auto-commit-action@v4
        env:
          GITHUB_TOKEN: ${{ secrets.GITBOOK_TOKEN }}
        with:
          commit_message: Update generated README
          branch: master
          commit_user_name: readme-scribe 🤖
          commit_user_email: actions@github.com
          commit_author: readme-scribe 🤖 <actions@github.com>

Created a GITBOOK_TOKEN which lives in my 'secrets' section of github and was generated from the developer settings under my profile. It must be prefixed with secrets. in the action. It doesn't work if you just try and use GITBOOK_TOKEN or whatever you decide to call your secret.

PreviousBuild your own Git ActionNextCommand line

Last updated 4 years ago

Was this helpful?