Skip to content

Update updatereadme.yml #15

Update updatereadme.yml

Update updatereadme.yml #15

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: ReadmeUpdate
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Runs command to update readme.md based on changes in the folders
- name: Update Readme.md at each commit to master
run: ./update_readme.sh
# Commit files
- name: Commit files
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -a -m "Add changes"
# Push changes to branch
- name: Push changes to branch
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
force: true
source_dir: ./README.md
destination_dir: ./README.md
message: "Update README.md"