-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (51 loc) · 1.85 KB
/
new-diff.yml
File metadata and controls
59 lines (51 loc) · 1.85 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
54
55
56
57
58
59
name: Create new diff in discussions
on:
workflow_dispatch:
inputs:
ff-diff-version:
description: "ff-diff version"
required: false
old-version:
description: "Old version"
required: true
new-version:
description: "New version"
required: true
permissions:
discussions: write
jobs:
create-discussion:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
ref: ${{ github.event.inputs.ff-diff-version }}
- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
with:
run_install: false
- name: Install latest node LTS
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version-file: "package.json"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run ff-diff
env:
OLD_VERSION: ${{ github.event.inputs.old-version }}
NEW_VERSION: ${{ github.event.inputs.new-version }}
run: |
pnpm run ff-diff diff "${OLD_VERSION}" "${NEW_VERSION}" \
--do-not-print-in-console \
--hide-common-changed-values \
--save-output-in-file
- name: Create a new GitHub Discussion
uses: abirismyname/create-discussion@c2b7c825241769dda523865ae444a879f6bbd0e0 # v2.1.1
with:
title: Diffs ${{ github.event.inputs.old-version }}-${{ github.event.inputs.new-version }}
body-filepath: .ff-diff/diffs/${{ github.event.inputs.old-version }}-${{ github.event.inputs.new-version }}.md
category-name: Diffs
github-token: ${{ secrets.GITHUB_TOKEN }}