-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
INFRA-92: add signing commits to workflows and actions (#58)
* add signing commits to workflows and actions * add secrets to checks
- Loading branch information
1 parent
91f3409
commit 032b19a
Showing
5 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,12 @@ inputs: | |
git-commit-email: | ||
description: 'Git commit email when pushing to branchpreviews repository' | ||
required: true | ||
git-commit-gpg-key-b64: | ||
description: base64 encoded signing key | ||
required: true | ||
git-commit-gpg-key-fingerprint: | ||
description: fingerprint of gpg key | ||
required: true | ||
image: | ||
description: 'Full docker image in format of host/repo:tag' | ||
required: true | ||
|
@@ -118,11 +124,22 @@ runs: | |
echo "all-base64=${all_base64}" >> $GITHUB_OUTPUT | ||
# yamllint enable rule:line-length | ||
|
||
- name: Configure signing key | ||
shell: bash | ||
# yamllint disable rule:line-length | ||
run: | | ||
echo ${{ inputs.git-commit-gpg-key-b64 }} | base64 -d > key.gpg | ||
gpg --import key.gpg | ||
rm key.gpg | ||
git config --global user.signingkey $(echo ${{ inputs.git-commit-gpg-key-fingerprint }} | tail -c 17) | ||
# yamllint enable rule:line-length | ||
|
||
- name: Commit branchpreview change | ||
uses: EndBug/[email protected] | ||
with: | ||
author_name: '${{ inputs.git-commit-author }}' | ||
author_email: '${{ inputs.git-commit-email }}' | ||
commit: -S | ||
# yamllint disable-line rule:line-length | ||
message: 'Upsert ${{ inputs.repository-name }}:${{ inputs.branch-name }} with image tag: ${{ steps.start-branchpreview.outputs.image-tag }}' | ||
add: '["*.yaml","*.txt"]' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,12 @@ inputs: | |
git-commit-email: | ||
description: 'Git commit email when pushing to branchpreviews repository' | ||
required: true | ||
git-commit-gpg-key-b64: | ||
description: base64 encoded signing key | ||
required: true | ||
git-commit-gpg-key-fingerprint: | ||
description: fingerprint of gpg key | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
|
@@ -79,6 +85,16 @@ runs: | |
'${{ inputs.repository-name }}' \ | ||
'${{ inputs.branch-name }}' | ||
- name: Configure signing key | ||
shell: bash | ||
# yamllint disable rule:line-length | ||
run: | | ||
echo ${{ inputs.git-commit-gpg-key-b64 }} | base64 -d > key.gpg | ||
gpg --import key.gpg | ||
rm key.gpg | ||
git config --global user.signingkey $(echo ${{ inputs.git-commit-gpg-key-fingerprint }} | tail -c 17) | ||
# yamllint enable rule:line-length | ||
|
||
- name: Commit deletion of the branchpreview | ||
uses: EndBug/[email protected] | ||
with: | ||
|