Skip to content

submit

submit #7

name: Submit Resource
on:
issues:
types: [opened]
jobs:
submit:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Add Resource to SUBMITTED.md
run: |
repoUrl=$(jq -r '.issue.html_url' "$GITHUB_EVENT_PATH")
repoName=$(jq -r '.issue.repository.name' "$GITHUB_EVENT_PATH")
repoDescription=$(jq -r '.issue.body' "$GITHUB_EVENT_PATH")
entry="|[${repoName}](${repoUrl})|${repoDescription}|[![](https://img.shields.io/github/languages/top/${repoName}?color=pink&style=flat-square)](${repoUrl}/graphs/contributors)|[![](https://flat.badgen.net/badge/license/Other/blue?label=)](${repoUrl}/blob/master/LICENSE)|[![](https://flat.badgen.net/github/last-commit/${repoName}?label=)](${repoUrl}/graphs/code-frequency)|"
echo "$entry" >> SUBMITTED.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}