From f51bda7d29a3b41107f30308a59c32ffedbd28fa Mon Sep 17 00:00:00 2001 From: Thomas Bui Date: Sat, 19 Dec 2020 00:20:34 -0800 Subject: [PATCH] Added pr comment action --- .github/workflows/peek_icons.yml | 37 +++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/.github/workflows/peek_icons.yml b/.github/workflows/peek_icons.yml index ca34a51c..1c6d6c9a 100644 --- a/.github/workflows/peek_icons.yml +++ b/.github/workflows/peek_icons.yml @@ -16,7 +16,7 @@ jobs: uses: actions/setup-python@v2 with: python-version: 3.8 - - name: Install dependencies (python, pip) + - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r ./.github/scripts/requirements.txt @@ -29,22 +29,35 @@ jobs: name: geckodriver-log path: ./geckodriver.log - name: Upload screenshot of the newly made icons + id: imgur_step uses: Thomas-Boi/public-upload-to-imgur@v1 if: ${{success()}} with: img_path: ./new_icons.png client_id: ${{secrets.IMGUR_CLIENT_ID}} - # - name: Comment on the PR about the result - # uses: github-actions-up-and-running/pr-comment@v1.0.1 - # with: - # repo-token: ${{ secrets.GITHUB_TOKEN }} - # message: > - # Hi! I'm Devicons' GitHub Actions Bot! + - name: Comment on the PR about the result + uses: github-actions-up-and-running/pr-comment@v1.0.1 + env: + IMG_URL: ${{ steps.imgur_step.outputs.imgur_url }} + MESSAGE: > + Hi! I'm Devicons' Peek Bot! - # I just peeked at the icons that you wanted to add and upload them to the - # [Actions page](https://github.com/devicons/devicon/actions). The maintainers - # will now take a look at it and decide whether to merge your PR. + I just peeked at the icons that you wanted to add using [icomoon.io](https://icomoon.io/app/#/select). - # Cheers :), + Here is the result below: + + ![Peeked Icons (top left)]({0}) + + Note: If the image doesn't show up, it's probably because it has been autodeleted by Imgur after 6 months due to our API choice. + + Here is [the url]({1}). + + + The maintainers will now take a look at it and decide whether to merge your PR. + + Cheers :), - # Bot + Peek Bot + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + message: ${{format(env.MESSAGE, env.IMG_URL, env.IMG_URL)}}