Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 20 additions & 21 deletions .github/workflows/dependabot-post-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,6 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Commit and push changes to licenses.json (if any)
run: |
make licenses

# Check if licenses.json differs from develop branch
git fetch origin develop
if git diff --quiet origin/develop -- licenses.json; then
echo "No changes to licenses.json, skipping commit and push"
exit 0
fi

git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add licenses.json
git diff --cached --quiet || git commit -m "chore: update license headers after dependabot update"
git push
- name: Set up Go
uses: actions/setup-go@v5
with:
Expand All @@ -47,11 +31,6 @@ jobs:
run: |
go mod tidy
git diff --exit-code
- name: Check if licences are up to date
run: |
set -euo pipefail
make licenses
git diff --exit-code
- name: Check if licence headers are up to date
run: |
make check-license-headers
Expand All @@ -71,3 +50,23 @@ jobs:
run: |
go run main.go &
RUN_E2E_TESTS=true go test ./e2e/... -v -count=1
- name: Commit and push changes to licenses.json (if any)
run: |
make licenses

# Check if licenses.json differs from current worktree
if git diff --quiet -- licenses.json; then
echo "No changes to licenses.json, skipping commit and push"
exit 0
fi

git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add licenses.json
git diff --cached --quiet || git commit -m "chore: update licenses.json after dependabot update"
git push
- name: Check if licences are up to date
run: |
set -euo pipefail
make licenses
git diff --exit-code