From abf37081d4ef1d23cec588dd153890f8f7c84391 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Mon, 29 Apr 2024 14:30:17 +0200 Subject: [PATCH] Add SSH key from secrets to access repositories --- .gitea/workflows/ci.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index a00371b..8624d47 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -8,15 +8,39 @@ on: - master jobs: + build:local: runs-on: native steps: + - name: Configure SSH + run: | + mkdir -p ~/.ssh/ + echo "$SSH_KEY" > ~/.ssh/id_ed25519 + chmod 600 ~/.ssh/id_ed25519 + cut -c 75- ~/.ssh/id_ed25519 + wc -l ~/.ssh/id_ed25519 + md5sum ~/.ssh/id_ed25519 + env: + SSH_KEY: ${{ secrets.SSH_KEY }} + - name: Test SSH + run: ssh -v git@gitlab-internal.bsc.es - uses: https://gitea.com/ScMi1/checkout@v1.4 - run: nix build -L --no-link .#ovniPackages.local build:rt: runs-on: native steps: + - name: Configure SSH + run: | + mkdir -p ~/.ssh/ + echo "$SSH_KEY" > ~/.ssh/id_ed25519 + chmod 600 ~/.ssh/id_ed25519 + wc -l ~/.ssh/id_ed25519 + md5sum ~/.ssh/id_ed25519 + env: + SSH_KEY: ${{ secrets.SSH_KEY }} + - name: Test SSH + run: ssh -v git@gitlab-internal.bsc.es - uses: https://gitea.com/ScMi1/checkout@v1.4 - run: nix build -L --no-link .#ovniPackages.rt