Sign hurl bot commits

This commit is contained in:
lepapareil 2022-11-16 09:40:57 +01:00
parent af8d29131a
commit 39f91fd0b7
No known key found for this signature in database
GPG Key ID: F4F06B068FB00692
5 changed files with 69 additions and 17 deletions

View File

@ -196,10 +196,18 @@ jobs:
run: |
git log --oneline --cherry origin/${{ env.BASE_REF }}...${{ env.HEAD_TYPE }}/${{ env.HEAD_REF }} | tee ${{ env.NEW_COMMITS_FILE }}
- name: Init git bot context
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.HURL_BOT_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.HURL_BOT_GPG_PRIVATE_KEY_PASSPHRASE }}
git_committer_name: "hurl-bot"
git_committer_email: "bot@hurl.dev"
git_user_signingkey: true
git_commit_gpgsign: true
- name: Merge fast forward head ref to base ref
run: |
git config --local user.email "bot@hurl.dev"
git config --local user.name "hurl-bot"
git merge ${{ env.HEAD_TYPE }}/${{ env.HEAD_REF }} --ff-only && exit_code=0 || exit_code=1
if [ ${exit_code} -eq 0 ] ; then
echo " - ✅ Merge fast forward succeeds."
@ -272,4 +280,3 @@ jobs:
run: |
gh pr comment "${{ github.event.issue.number }}" --body "✅ New PR [${{ needs.update-branch-version.outputs.pr_number }}](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/pull/${{ needs.update-branch-version.outputs.pr_number }}) created to update master branch to ${{ needs.accept-pull-request.outputs.new_version_master_snapshot_version }} version"

View File

@ -45,10 +45,22 @@ jobs:
run: |
grcov . --binary-path target/debug -s . -t html --branch --ignore-not-existing -o ./coverage/
- name: Init git bot context
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.HURL_BOT_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.HURL_BOT_GPG_PRIVATE_KEY_PASSPHRASE }}
git_committer_name: "hurl-bot"
git_committer_email: "bot@hurl.dev"
git_user_signingkey: true
git_commit_gpgsign: true
- name: Deploy Github Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.HURL_BOT_TOKEN }}
personal_token: ${{ secrets.HURL_BOT_TOKEN }}
user_name: 'hurl-bot'
user_email: 'bot@hurl.dev'
publish_branch: github-pages
publish_dir: coverage
destination_dir: coverage

View File

@ -210,11 +210,6 @@ jobs:
with:
ref: ${{ needs.set-context.outputs.release_branch }}
- name: Init git credentials
run: |
git config --local user.email "bot@hurl.dev"
git config --local user.name "hurl-bot"
- name: Update version
run: |
hurl_packages="hurl_core hurl hurlfmt"
@ -257,6 +252,16 @@ jobs:
python3 bin/docs/build_readme.py github > README.md
python3 bin/docs/build_readme.py crates > packages/hurl/README.md
- name: Init git bot context
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.HURL_BOT_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.HURL_BOT_GPG_PRIVATE_KEY_PASSPHRASE }}
git_committer_name: "hurl-bot"
git_committer_email: "bot@hurl.dev"
git_user_signingkey: true
git_commit_gpgsign: true
- name: Push create release commits
run: |
git commit -am "Create ${{ needs.set-context.outputs.release_version }} release"
@ -306,10 +311,16 @@ jobs:
with:
ref: ${{ needs.set-context.outputs.release_branch }}
- name: Init git credentials
run: |
git config --local user.email "bot@hurl.dev"
git config --local user.name "hurl-bot"
- name: Init git bot context
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.HURL_BOT_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.HURL_BOT_GPG_PRIVATE_KEY_PASSPHRASE }}
git_committer_name: "hurl-bot"
git_committer_email: "bot@hurl.dev"
git_user_signingkey: true
git_commit_gpgsign: true
- uses: actions/download-artifact@master
with:
path: artifacts

View File

@ -12,6 +12,12 @@ on:
HURL_BOT_TOKEN:
description: 'secrets.HURL_BOT_TOKEN from the caller workflow'
required: true
HURL_BOT_GPG_PRIVATE_KEY:
description: 'secrets.HURL_BOT_GPG_PRIVATE_KEY from the caller workflow'
required: true
HURL_BOT_GPG_PRIVATE_KEY_PASSPHRASE:
description: 'secrets.HURL_BOT_GPG_PRIVATE_KEY_PASSPHRASE from the caller workflow'
required: true
inputs:
new_version:
description: "Version (x.y.z-SNASPHOT)"
@ -92,10 +98,18 @@ jobs:
python3 bin/docs/build_readme.py github > README.md
python3 bin/docs/build_readme.py crates > packages/hurl/README.md
- name: Init git bot context
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.HURL_BOT_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.HURL_BOT_GPG_PRIVATE_KEY_PASSPHRASE }}
git_committer_name: "hurl-bot"
git_committer_email: "bot@hurl.dev"
git_user_signingkey: true
git_commit_gpgsign: true
- name: Push commits
run: |
git config --local user.email "bot@hurl.dev"
git config --local user.name "hurl-bot"
git checkout -b "${BOT_UPDATE_VERSION_BRANCHE_NAME}"
git commit -am "Update hurl version to ${{ inputs.new_version }}"
git push --set-upstream origin "${BOT_UPDATE_VERSION_BRANCHE_NAME}" && git_exit_code=0 || git_exit_code=$?

View File

@ -65,11 +65,19 @@ jobs:
exit 1
fi
- name: Init git bot context
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.HURL_BOT_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.HURL_BOT_GPG_PRIVATE_KEY_PASSPHRASE }}
git_committer_name: "hurl-bot"
git_committer_email: "bot@hurl.dev"
git_user_signingkey: true
git_commit_gpgsign: true
- name: Push updates to branch
if: env.UPDATED_CRATES_COUNT != 0
run: |
git config --local user.email "bot@hurl.dev"
git config --local user.name "hurl-bot"
git checkout -b "${BOT_UPDATE_BRANCHE_NAME}"
git commit -am "Update crates"
git push --set-upstream origin "${BOT_UPDATE_BRANCHE_NAME}" && git_exit_code=0 || git_exit_code=$?