Skip to content

Commit a11dae6

Browse files
authored
chore: Use custom action to commit changes in CI instead of git commit (#2533)
We want to enforce commit signing for all commits in our repositories. To do that, we need to make sure even commits created by CI workflows are signed. It would be possible to sign using GPG keys, but that would require a lot of maintenance. Instead, we can commit using the GitHub GraphQL API, which automatically signs commits. This PR replaces direct `git commit` / `git push` usage (and third-party commit actions like `EndBug/add-and-commit`) with the `apify/actions/signed-commit` action, which uses the GraphQL API under the hood.
1 parent c96af47 commit a11dae6

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

.github/workflows/bump-openapi-version.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ jobs:
2222

2323
- name: Commit changes
2424
id: commit
25-
uses: EndBug/add-and-commit@v10
25+
uses: apify/actions/signed-commit@v1.0.0
2626
with:
27-
author_name: github-actions[bot]
28-
author_email: 41898282+github-actions[bot]@users.noreply.github.com
2927
message: "chore(openapi): Update OpenAPI version [skip ci]"
3028
pull: '--rebase --autostash'
29+
github-token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}

.github/workflows/publish-to-npm.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,12 @@ jobs:
9393
9494
- name: Commit the new theme version
9595
continue-on-error: true
96-
uses: EndBug/add-and-commit@v10
96+
uses: apify/actions/signed-commit@v1.0.0
9797
with:
98-
add: 'apify-docs-theme/package*.json'
99-
author_name: github-actions[bot]
100-
author_email: 41898282+github-actions[bot]@users.noreply.github.com
10198
message: 'chore: publish new version of @apify/docs-theme [skip ci]'
99+
add: 'apify-docs-theme/package.json apify-docs-theme/package-lock.json'
102100
pull: '--rebase --autostash'
101+
github-token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
103102

104103
rebuild-docs:
105104
needs: publish

0 commit comments

Comments
 (0)