Skip to content

updated oracle.md

updated oracle.md #358

Workflow file for this run

# 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/scripts/gist-sync.sh
- .github/workflows/gist-sync.yaml
pull_request:
branches:
- master
- main
paths:
- '**/*.md'
- .github/scripts/gist-sync.sh
- .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
fetch-depth: 0
# using actions/cache instead
#
#- name: Download previous SHA
# uses: actions/download-artifact@v3
# with:
# name: last-successful-sha
- name: Cache Last Successful SHA
uses: actions/cache@v3
id: sha-cache
with:
path: last-successful-sha.txt
key: last-successful-sha
- name: Get Previous SHA
run: |
PREVIOUS_SHA="$(cat last-successful-sha.txt || :)"
echo "Previous commit: ${PREVIOUS_SHA:-}"
echo "PREVIOUS_SHA=${PREVIOUS_SHA:-}" >> "$GITHUB_ENV"
- name: Git log since last workflow
run: |
git log "$PREVIOUS_SHA"..HEAD --oneline
#- 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
- name: Store Current Commit SHA
run: echo "$GITHUB_SHA" > last-successful-sha.txt
#- name: Upload artifact
# uses: actions/upload-artifact@v3
# with:
# name: last-successful-sha
# path: last-successful-sha.txt