Skip to content

Commit

Permalink
Update api changes workflow, remove godoc taskfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Tit Petric committed Aug 22, 2023
1 parent 8815c6d commit 579daab
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 84 deletions.
65 changes: 1 addition & 64 deletions .github/workflows/api-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,69 +11,6 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout Tyk
uses: actions/checkout@v3
- uses: TykTechnologies/github-actions/.github/workflows/godoc.yml@1e98fcf2bc8abfabb146718459f40ab682e53287
with:
fetch-depth: 1

- name: Setup Golang
uses: actions/setup-go@v4
with:
go-version: "1.20"

- name: Install Task
uses: arduino/setup-task@v1
with:
version: 3

- name: Fetch base branch
run: git fetch origin ${{ github.base_ref }}

- name: Stash taskfiles
run: |
mkdir -p /tmp/.taskfiles
rsync -a ./.taskfiles/ /tmp/.taskfiles/
- name: Set up comment author
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Collect API docs
run: |
go mod tidy
task -t .taskfiles/godoc/Taskfile.yml > current.txt
git checkout -- .
git checkout ${{ github.base_ref }}
go mod tidy
rsync -a /tmp/.taskfiles/ .taskfiles/
task -t .taskfiles/godoc/Taskfile.yml > prev.txt
- name: Diff API docs
id: api-check
run: |
set +e
diff -u prev.txt current.txt > changes.txt
echo "diff-output<<EOF" >> $GITHUB_OUTPUT
cat changes.txt >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Find Comment
uses: peter-evans/find-comment@v2
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: API Changes

- name: Create or update comment
uses: peter-evans/create-or-update-comment@v3
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
API Changes
```diff
${{ steps.api-check.outputs.diff-output || 'none detected' }}
```
edit-mode: replace
20 changes: 0 additions & 20 deletions .taskfiles/godoc/Taskfile.yml

This file was deleted.

0 comments on commit 579daab

Please sign in to comment.