-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (42 loc) · 1.54 KB
/
submit-source.yml
File metadata and controls
53 lines (42 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Submit Source
on:
repository_dispatch:
types: [submit-source]
jobs:
create-pr:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4.2.0
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version-file: '.nvmrc'
- run: pnpm i
- name: Add source to sources.ts
env:
SOURCE_DATA: ${{ toJSON(github.event.client_payload) }}
run: node --strip-types tools/add-source.ts
- run: pnpm fix
- name: Open PR
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GH_PAT }}
branch: submit-source/${{ github.run_id }}
commit-message: 'feat(sources): add "${{ github.event.client_payload.name }}"'
title: 'feat(sources): add "${{ github.event.client_payload.name }}"'
body: |
Source submitted via digestweb.dev/submit.
**Name:** ${{ github.event.client_payload.name }}
**Category:** ${{ github.event.client_payload.category }}
**Home URL:** ${{ github.event.client_payload.homeUrl }}
**Feed URL:** ${{ github.event.client_payload.feed }}
**Author:** ${{ github.event.client_payload.authorName }}
**Tags:** ${{ toJSON(github.event.client_payload.tags) }}
Please review and merge when ready.
labels: source-submission
draft: false
add-paths: tools/sources.ts