Skip to content

Commit 2629934

Browse files
authored
Commit manifests on Remote (#8)
* remote-copy.yml: add, commit and push updates to manifests * Add signing key to runner, forward to remote connection * remote-copy.yml: Start `gpg-agent` and preset the passphrase for commits
1 parent e5acfea commit 2629934

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/remote-copy.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,21 @@ jobs:
258258
${{ env.LOCAL_MANIFEST_FILE_LIST_PATH }}
259259
echo "paths=$(cat ${{ env.LOCAL_MANIFEST_FILE_LIST_PATH }})" >> $GITHUB_OUTPUT
260260
261+
- name: Commit Updated Manifests to ${{ github.repository }}
262+
env:
263+
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
264+
run: |
265+
ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} -i ${{ steps.ssh.outputs.private-key-path }} /bin/bash <<'EOT'
266+
eval $(gpg-agent --daemon)
267+
$(gpgconf --list-dirs libexecdir)/gpg-preset-passphrase \
268+
--passphrase '${{ secrets.GH_ACTIONS_BOT_GPG_PASSPHRASE }}' \
269+
--preset '${{ secrets.GH_ACTIONS_BOT_GPG_KEYGRIP }}'
270+
cd "${{ vars.CONFIGS_INPUT_DIR }}" || echo "::error::Can't CD into vars.CONFIGS_INPUT_DIR to commit" && exit 2
271+
git add .
272+
git commit -m "Updated manifests as part of ${{ env.RUN_URL }}"
273+
git push
274+
EOT
275+
261276
copy-to-tape-gadi:
262277
name: Copy To Tape On ${{ inputs.remote-environment }}
263278
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)