-
Notifications
You must be signed in to change notification settings - Fork 14
35 lines (34 loc) · 973 Bytes
/
private-repo.yml
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
name: Private Repository
on:
push:
branches: [master]
env:
CGO_ENABLED: 0
jobs:
private-repo-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '>=1.22.0'
- run: go build
- name: Get the expected output
run: |
curl -H "Authorization: token ${GITHUB_TOKEN}" 'https://raw.githubusercontent.com/rhysd/private-repo-test/refs/heads/main/CHANGELOG.md' > EXPECTED.md
cat EXPECTED.md
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
- name: Generate
run: |
./changelog-from-release -r 'https://github.com/rhysd/private-repo-test' > OUTPUT.md
cat OUTPUT.md
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
- name: Check
run: |
diff=$(diff EXPECTED.md OUTPUT.md)
if [[ "$diff" != "" ]]; then
echo "$diff" >&2
exit 1
fi