Skip to content

Commit

Permalink
add avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
nkrusch committed Dec 10, 2023
1 parent 05e6afc commit ca4593e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Binary file added .github/assets/vote.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 8 additions & 4 deletions .github/workflows/vote.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Vote for paper
name: Paper vote

on:
# schedule:
Expand All @@ -16,7 +16,9 @@ on:
branches: [ main ]

env:
COLORS: ("", "26367" "16750848" "65433" "10027263")
COLORS: ("" "26367" "16750848" "65433" "10027263")
OPTIONS: (1 2 3)
AVATAR: https://raw.githubusercontent.com/the-au-forml-lab/plgroup/main/.github/assets/vote.png

jobs:
vote_options:
Expand All @@ -26,7 +28,7 @@ jobs:
matrix:
# number of vote options to generate;
# The values are not relevant, just the list length.
options: [ 1, 2, 3 ]
options: ${{ env.OPTIONS }}
# to generate and post options sequentially
max-parallel: 1
steps:
Expand Down Expand Up @@ -79,6 +81,7 @@ jobs:
- name: Post vote option
if: ${{ env.DISCORD_WEBHOOK != '' }}
env:
DISCORD_AVATAR: ${{ env.AVATAR }}
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_TEST }}
DISCORD_EMBEDS: '[{ "color":"${{ steps.vars.outputs.color }}", "title":"${{ steps.vars.outputs.title }}", "description":"${{ steps.vars.outputs.subabs }} [Merge PR ${{ steps.paperpr.outputs.pull-request-number }}](${{ steps.paperpr.outputs.pull-request-url }})" }]'
uses: Ilshidur/action-discord@master
Expand All @@ -92,6 +95,7 @@ jobs:
if: ${{ env.DISCORD_WEBHOOK != '' }}
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_TEST }}
DISCORD_AVATAR: ${{ env.AVATAR }}
uses: Ilshidur/action-discord@master
with:
args: "**Voting Instructions.**\n\n- Rank vote papers using numbers :one: -- :three: favorite -- least favorite.\n- Set the winner by merging its PR."
args: "**Voting Instructions.**\n- Rank vote papers using numbers :${{ env.COLORS[0] }}: — :${{ (env.COLORS).size() }}: favorite -- least favorite.\n- Set the winner by merging its PR."

0 comments on commit ca4593e

Please sign in to comment.