Files
JavaScript/.github/workflows/UpdateDirectory.yml
Rak Laptudirm 42b9f64ea1 merge: Update workflow organization and environments (#971)
* chore: only run update directory on `master`

* chore: move codespell to CI workflow

* chore: remove codespell workflow(moved)

* chore: listen for `push` only on `master`

* chore: remove `pull_request` type params
2022-04-03 12:36:12 +05:30

31 lines
904 B
YAML

# This GitHub Action updates the DIRECTORY.md file (if needed) when doing a git push
name: Update Directory
on:
push:
branches:
- master
jobs:
updateDirectory:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14"
cache: npm
- name: 📦 Install dependencies
run: npm ci
- name: 🗄️ Create Directory from JS files
run: node .github/workflows/UpdateDirectory.mjs
- name: 🤓 Commit & push new Directory (if needed)
run: |
git config --global user.name github-actions
git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
.github/workflows/CommitAndPushDirectory.sh