From e1c05b205f6db42c1d0e2299ba0fe15bb05e3b55 Mon Sep 17 00:00:00 2001 From: NikitaSkrynnik Date: Mon, 1 Apr 2024 13:52:38 +0700 Subject: [PATCH 1/2] add importing gpg keys Signed-off-by: NikitaSkrynnik --- .github/workflows/update-refs.yaml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/update-refs.yaml b/.github/workflows/update-refs.yaml index 1cc909354ca1..9e2492b46e0e 100644 --- a/.github/workflows/update-refs.yaml +++ b/.github/workflows/update-refs.yaml @@ -4,21 +4,24 @@ 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 *` @@ -26,5 +29,5 @@ jobs: git config --global user.email "nsmbot@networkservicmesh.io" git config --global user.name "NSMBot" git add -- . - git commit -s -m "Update references" - git push + git commit -m "Update references" + git push \ No newline at end of file From 4f3e5483b4a8789cf86faa33dea78ac56346d17c Mon Sep 17 00:00:00 2001 From: NikitaSkrynnik Date: Mon, 1 Apr 2024 14:06:56 +0700 Subject: [PATCH 2/2] fix yaml linter issues Signed-off-by: NikitaSkrynnik --- .github/workflows/update-refs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-refs.yaml b/.github/workflows/update-refs.yaml index 9e2492b46e0e..0091d02bd990 100644 --- a/.github/workflows/update-refs.yaml +++ b/.github/workflows/update-refs.yaml @@ -30,4 +30,4 @@ jobs: git config --global user.name "NSMBot" git add -- . git commit -m "Update references" - git push \ No newline at end of file + git push