-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
150fdae
commit bddb10f
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: "Coffee Diary" | ||
description: "A GitHub Action to generate Coffee Diary SVGs, allowing you to showcase your coffee journey." | ||
branding: | ||
icon: "book" | ||
color: "white" | ||
inputs: | ||
username: | ||
description: "Your Github username" | ||
required: true | ||
target-branch: | ||
description: "Branch to deploy Coffee Diary SVGs in your repository" | ||
required: true | ||
github-token: | ||
description: "GitHub token use to deploy github pages" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "16.x" | ||
|
||
- name: Download SVG | ||
shell: bash | ||
run: | | ||
mkdir coffee-diary-svg | ||
curl -o coffee-diary-svg/${{ inputs.username }}-coffee-diary.svg https://coffee-diary.com/api/${{ inputs.username }} | ||
- name: push coffee-diary.svg to the coffee-diary branch | ||
uses: crazy-max/[email protected] | ||
with: | ||
target_branch: ${{ inputs.target-branch }} | ||
build_dir: coffee-diary-svg | ||
env: | ||
GITHUB_TOKEN: ${{ inputs.github-token }} |