-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #162 from datamweb/datamweb-patch-2
Datamweb patch 2
- Loading branch information
Showing
1 changed file
with
21 additions
and
7 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 |
---|---|---|
|
@@ -24,22 +24,35 @@ jobs: | |
current_year=$(date +%Y) | ||
echo "CURRENT_YEAR=${current_year}" >> $GITHUB_ENV | ||
- name: Setup GPG | ||
- name: Import GPG key | ||
run: echo $GPG_KEY | base64 --decode | gpg --batch --import | ||
env: | ||
GPG_KEY: ${{ secrets.GPG_KEY }} | ||
|
||
- name: Add the custom gpg siging program that passes the passphrase to the gpg CLI | ||
run: | | ||
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import | ||
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf | ||
gpg --batch --passphrase "${{ secrets.GPG_PASSPHRASE }}" --list-keys | ||
rm -rf /tmp/gpg.sh | ||
echo '#!/bin/bash' >> /tmp/gpg.sh | ||
echo 'gpg --batch --pinentry-mode=loopback --passphrase $GPG_KEY_PASSPHRASE $@' >> /tmp/gpg.sh | ||
chmod +x /tmp/gpg.sh | ||
- name: Create new branch and commit changes | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CURRENT_YEAR: ${{ env.CURRENT_YEAR }} | ||
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} | ||
GPG_KEY_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }} | ||
GIT_COMMITTER_NAME: ${{ secrets.GIT_COMMITTER_NAME }} | ||
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }} | ||
GIT_AUTHOR_NAME: Pooya Parsa Dadashi | ||
GIT_AUTHOR_EMAIL: [email protected] | ||
run: | | ||
# Configure Git for the action | ||
git config --local user.email "action@github.com" | ||
git config --local user.name "GitHub Action" | ||
git config --local user.email "pooya_parsa_dadashi@yahoo.com" | ||
git config --local user.name "Pooya Parsa Dadashi" | ||
git config --local commit.gpgsign true | ||
git config --local user.signingkey ${{ secrets.GPG_KEY_ID }} | ||
git config --local user.signingkey $GPG_KEY_ID | ||
git config --local gpg.program /tmp/gpg.sh | ||
# Create a new branch for the changes | ||
|
@@ -51,6 +64,7 @@ jobs: | |
git add . # Ensure all changes are added | ||
git commit -m "docs: update copyright year to ${{ env.CURRENT_YEAR }}" | ||
git push -f origin $BRANCH_NAME | ||
- name: Create Pull Request Github CLI | ||
env: | ||
|