Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
tommerty committed Jan 5, 2025
1 parent c92c74e commit b270a25
Show file tree
Hide file tree
Showing 938 changed files with 951,001 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/doras-readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Doras Link Bio Generator

on:
workflow_dispatch:
inputs:
username:
description: "Doras.to username"
required: true
git-email:
description: "Git commit email"
required: false
default: "[email protected]"
git-username:
description: "Git commit username"
required: false
default: "GitHub Action"

jobs:
update-bio:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
46 changes: 46 additions & 0 deletions .github/workflows/update-readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Update README with Doras Links

on:
workflow_dispatch:
inputs:
username:
description: "Doras.to username"
required: true
git-email:
description: "Git commit email"
required: false
default: "[email protected]"
git-username:
description: "Git commit username"
required: false
default: "GitHub Action"
schedule:
- cron: "0 0 * * *" # Runs daily

jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Generate Doras Links
uses: dorasto/github-links@v1
with:
username: ${{ github.event.inputs.username }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Update README
run: |
# Read the generated markdown
DORAS_CONTENT=$(cat doras-links.md)
# Update README.md between markers
sed -i '/<!-- DORAS-LINKS-START -->/,/<!-- DORAS-LINKS-END -->/c\<!-- DORAS-LINKS-START -->\n'"$DORAS_CONTENT"'\n<!-- DORAS-LINKS-END -->' README.md
- name: Commit changes
run: |
git config --local user.email "${{ github.event.inputs.git-email || '[email protected]' }}"
git config --local user.name "${{ github.event.inputs.git-username || 'GitHub Action' }}"
git add README.md
git commit -m "Update Doras links" || exit 0
git push
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"trailingComma": "es5",
"semi": true,
"tabWidth": 4,
"singleQuote": false,
"jsxSingleQuote": false
}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<!-- DORAS-LINKS-START -->
<!-- DORAS-LINKS-END -->
12 changes: 12 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: "Doras Link Bio Generator"
description: "Generate a formatted markdown bio from Doras.to API"
inputs:
username:
description: "Doras.to username"
required: true
outputs:
markdown:
description: "Generated markdown for readme"
runs:
using: "node20"
main: "dist/index.js"
1 change: 1 addition & 0 deletions node_modules/.bin/tsc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/tsserver

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b270a25

Please sign in to comment.