Added workflow to generate new templates added in latest release (#3724)

patch-1
Sandeep Singh 2022-02-18 11:34:16 +05:30 committed by GitHub
parent d031462ac8
commit 0b3f10616f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 33 additions and 0 deletions

33
.github/workflows/new-templates.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: 🥳 New Template List
on:
push:
branches:
- master
workflow_dispatch:
jobs:
templates:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Generate new template list
id: new-additions
run: |
git diff --name-only --diff-filter=A $(git tag | tail -n 1) @ . | grep .yaml | tee .new-additions
- name: Commit files
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .new-additions -f
git commit -m "Auto Generated New Template Addition List [$(date)] :robot:" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}