Skip to content

Commit

Permalink
add importing gpg keys
Browse files Browse the repository at this point in the history
Signed-off-by: NikitaSkrynnik <[email protected]>
  • Loading branch information
NikitaSkrynnik committed Apr 1, 2024
1 parent b8b1b63 commit e1c05b2
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/update-refs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,30 @@ on:
push:
branches:
- main
workflow_run:
types:
- completed
workflows:
- 'automerge'
jobs:
update-refs:
name: Update references
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' && github.actor == 'nsmbot' || github.event_name == 'push' }}
steps:
- name: Check out the code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: main

- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true

- name: Update references
run: |
sed -r -i '/github.com\/networkservicemesh\/deployments-k8s/ s/(\?ref=[a-z0-9.]*)/\?ref='"$GITHUB_SHA"'/g' `grep '?ref=' -rl *`
sed -r -i '/raw.githubusercontent.com\/networkservicemesh\/deployments-k8s/ s/(deployments-k8s\/[a-z0-9.]*)/deployments-k8s\/'"$GITHUB_SHA"'/g' `grep 'raw.githubusercontent.com' -rl *`
git config --global user.email "[email protected]"
git config --global user.name "NSMBot"
git add -- .
git commit -s -m "Update references"
git push
git commit -m "Update references"
git push

0 comments on commit e1c05b2

Please sign in to comment.