-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -271,21 +271,25 @@ jobs: | |
- name: Configure settings | ||
run: | | ||
# Create secure temporary directory | ||
GNUPGHOME="$(mktemp -d)" | ||
echo "${{ secrets.SGK }}" | gpg --batch --import | ||
# Create secure temporary directory for GPG operations | ||
export GNUPGHOME="$(mktemp -d)" | ||
echo "GNUPGHOME=$GNUPGHOME" >> $GITHUB_ENV | ||
echo "${{ secrets.SGK }}" | gpg --batch --import | ||
# Get the key ID | ||
SIGNING_KEY=$(gpg --list-secret-keys --keyid-format LONG | grep sec | awk '{print $2}' | cut -d'/' -f2) | ||
echo "SIGNING_KEY=$SIGNING_KEY" >> $GITHUB_ENV | ||
git config --local user.signingkey "$SIGNING_KEY" | ||
git config --local commit.gpgsign true | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
echo "default-key $SIGNING_KEY" > "$GNUPGHOME/gpg.conf" | ||
rm -rf "$GNUPGHOME" | ||
chmod 700 "$GNUPGHOME" | ||
find "$GNUPGHOME" -type f -exec chmod 600 {} \; | ||
- name: Run Update Changelog Script | ||
id: update_changelog | ||
|
@@ -342,6 +346,13 @@ jobs: | |
run: | | ||
echo "changelog_check_name=Update Changelog" >> $GITHUB_OUTPUT | ||
- name: Remove Settings | ||
if: always() | ||
run: | | ||
if [ -n "$GNUPGHOME" ] && [ -d "$GNUPGHOME" ]; then | ||
rm -rf "$GNUPGHOME" | ||
fi | ||
- name: Update PR Status | ||
if: steps.update_changelog.outputs.changes_made == 'true' | ||
uses: actions/github-script@v7 | ||
|