Skip to content

Commit 0cdfdcd

Browse files
authored
Merge pull request #9 from devicons/develop
Added color and icon the action
2 parents df8742f + 3f14892 commit 0cdfdcd

File tree

4 files changed

+44
-7
lines changed

4 files changed

+44
-7
lines changed

.github/workflows/demo.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Demo the action
2+
on: workflow_dispatch
3+
jobs:
4+
demo:
5+
name: Demo the repo's capability
6+
runs-on: ubuntu-18.04
7+
steps:
8+
- name: Upload a single file
9+
uses: devicons/public-upload-to-imgur@v2
10+
id: step_1
11+
with:
12+
path: ./docs/example.png
13+
client_id: ${{secrets.IMGUR_CLIENT_ID}}
14+
- name: Upload a folder with multiple files
15+
uses: devicons/public-upload-to-imgur@v2
16+
id: step_2
17+
with:
18+
path: ./docs/
19+
client_id: ${{secrets.IMGUR_CLIENT_ID}}
20+
- name: Upload a glob pattern
21+
uses: devicons/public-upload-to-imgur@v2
22+
id: step_3
23+
with:
24+
path: ./*.png
25+
client_id: ${{secrets.IMGUR_CLIENT_ID}}
26+
- name: View results
27+
env:
28+
STEP_1_RESULT: ${{ fromJSON(steps.step_1.outputs.imgurls)[0] }} # view only one result
29+
STEP_2_RESULT: ${{ steps.step_2.outputs.imgurls }}
30+
STEP_3_RESULT: ${{ steps.step_3.outputs.imgurls }}
31+
run: |
32+
echo $STEP1_RESULT
33+
echo $STEP2_RESULT
34+
echo $STEP3_RESULT

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
A GitHub Action that can upload "anonymous" images to Imgur using their API and give you the URL of the newly created image.
33
Note: "anonymous" means that the image is not tied to an account (see [this](https://apidocs.imgur.com/#intro)).
44

5+
**Purpose**
56
This action is used as part of the peek-icons workflow in the [devicon](https://github.com/devicons/devicon) repo to automate the
6-
icon checking process.
7+
icon checking process. Our workflow would generate screenshots using Selenium, upload it to Imgur (using this action) then publish a comment on a PR showing the result (using [another action](https://github.com/marketplace/actions/pr-comment)).
78

89
## How To Use ##
910

@@ -96,13 +97,13 @@ steps:
9697
```
9798

9899

99-
**Final Result**
100-
101-
102-
Here's a real life example from our [devicon](https://github.com/devicons/devicon) repo:
100+
**Real Life Examples**
101+
Here's an usecase from our [devicon](https://github.com/devicons/devicon) repo:
103102

104103
![GitHub bot using the action](docs/example.PNG)
105104

105+
You can also view the [example workflow]() and the [resulting action]() in this repo.
106+
106107
## Credits ##
107108
The script for parsing multiple paths and glob inputs was taken from the [upload-artifacts](https://github.com/actions/upload-artifact/blob/main/src/search.ts) repo.
108109

action.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
name: 'Upload To Imgur'
2-
description: 'Upload image(s) to Imgur using their API'
1+
name: 'Publish on imgur'
2+
description: 'Upload image(s) to imgur using their API'
3+
icon: 'image'
4+
color: 'green'
35
inputs:
46
path:
57
description: 'Path to the images'

docs/logo.png

6.72 KB
Loading

0 commit comments

Comments
 (0)