updated README.md #75
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim:ts=2:sts=2:sw=2:et | |
# | |
# Author: Hari Sekhon | |
# Date: 2024-03-22 00:24:54 +0000 (Fri, 22 Mar 2024) | |
# | |
# https///github.com/HariSekhon/Knowledge-Base | |
# | |
# License: see accompanying Hari Sekhon LICENSE file | |
# | |
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish | |
# | |
# https://www.linkedin.com/in/HariSekhon | |
# | |
--- | |
name: Gist Sync | |
on: | |
push: | |
branches: | |
- master | |
- main | |
paths: | |
- '**/*.md' | |
- .github/workflows/gist-sync.yaml | |
pull_request: | |
branches: | |
- master | |
- main | |
paths: | |
- '**/*.md' | |
- .github/workflows/gist-sync.yaml | |
workflow_dispatch: | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: false | |
defaults: | |
run: | |
shell: bash -euxo pipefail {0} | |
env: | |
GH_TOKEN: ${{ secrets.GIST_TOKEN }} | |
jobs: | |
sync-gists: | |
if: github.repository_owner == 'HariSekhon' | |
name: Sync Gists | |
timeout-minutes: 20 | |
permissions: | |
contents: read | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
#name: Git Checkout # better to show the action@version | |
with: | |
submodules: 'true' # requires Git 2.18+ to be installed first | |
#- name: GitHub CLI Auth Login | |
# run: gh auth login --with-token <<< "$GH_TOKEN" | |
# | |
# The value of the GH_TOKEN environment variable is being used for authentication. | |
# To have GitHub CLI store credentials instead, first clear the value from the environment. | |
- name: Sync READMEs to Gists | |
run: .github/scripts/gist-sync.sh |