Use SSH deploy key for metrics push

This commit is contained in:
jgromes 2025-01-03 19:15:25 +01:00
parent 680e88c739
commit 4bcf78cc2b

View file

@ -204,11 +204,18 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: build
steps: steps:
- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.ACTIONS_METRICS_DEPLOY_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com >> ~/.ssh/known_hosts
- name: Clone artifact repo - name: Clone artifact repo
run: run:
| |
cd $PWD/.. cd $PWD/..
git clone https://${{ github.actor }}:${{ secrets.ACTIONS_METRICS_PUSH_TOKEN }}@github.com/radiolib-org/artifacts.git git clone git@github.com:radiolib-org/artifacts.git
cd artifacts cd artifacts
git config --global user.name "${{ github.actor }}" git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com" git config --global user.email "${{ github.actor }}@users.noreply.github.com"