Skip to content

Commit f74e16e

Browse files
committed
Debug why the commit fails
1 parent ae00176 commit f74e16e

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

.github/workflows/update-licenses.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: Commit as needed
4848
env:
4949
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
50-
COMMIT_MESSAGE: "Fix licenses after dependabot changes"
50+
COMMIT_MESSAGE: 'Fix licenses after dependabot changes\n\n[dependabot skip]'
5151
run: |
5252
if [[ $(git diff --stat) != '' ]]; then
5353
echo 'Committing changes'

scripts/create-signed-commit.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# author and committer arguments. See:
1818
# https://github.com/peter-evans/create-pull-request/issues/1241#issuecomment-1232477512
1919

20-
set -euo pipefail
20+
set -euxo pipefail
2121

2222
# Configuration defaults
2323
github_token=${GITHUB_TOKEN:?}
@@ -68,12 +68,10 @@ NEW_TREE_SHA=$(curl -s -X POST -H "Authorization: token $github_token" \
6868
echo "New tree SHA: $NEW_TREE_SHA"
6969

7070
# Create a new commit
71-
set -x
7271
NEW_COMMIT_SHA=$(curl -s -X POST -H "Authorization: token $github_token" \
7372
-H "Accept: application/vnd.github.v3+json" \
7473
-d "{\"message\": \"$commit_message\", \"tree\": \"$NEW_TREE_SHA\", \"parents\": [\"$LATEST_COMMIT_SHA\"]}" \
75-
"https://api.github.com/repos/$repo_owner/$repo_name/git/commits" | jq -r '.sha')
76-
set +x
74+
"https://api.github.com/repos/$repo_owner/$repo_name/git/commits" | jq -r '.sha')
7775
echo "New commit SHA: $NEW_COMMIT_SHA"
7876

7977
# Update the reference of the branch to point to the new commit

0 commit comments

Comments
 (0)