From ca491029ad16be05f5f543c79ca86518a8e840a2 Mon Sep 17 00:00:00 2001 From: Ben Mezger Date: Sun, 14 Jan 2024 22:32:32 +0100 Subject: [PATCH] chore: add ssh key --- .github/workflows/build.yaml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9269d3b..9a1d047 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -44,24 +44,16 @@ jobs: - name: Set source permissions run: | chown -R nonroot:nonroot . - - name: Clone sedspkg - run: | - git clone --depth 1 https://${{ secrets.GITLAB_SECRET_TOKEN }}@gitlab.com/benmezger/sedspkgs.git $pkgsdir && \ - chown -R nonroot:nonroot $pkgsdir + - uses: webfactory/ssh-agent@v0.8.0 + with: + ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - name: Build packages run: | - sudo -u nonroot just makepkg_flags=$makepkg_flags all + sudo -E -u nonroot just makepkg_flags=$makepkg_flags all - name: Show sedspkg diff run: | cd $pkgsdir sudo -u nonroot git diff - name: Commit and release run: | - cd $pkgsdir - - git config --global --add safe.directory $pkgsdir - git config --global user.email "me@benmezger.nl" - git config --global user.name "Ben Mezger" - git remote set-url origin https://oauth:${{ secrets.GITLAB_SECRET_TOKEN }}@gitlab.com/benmezger/sedspkgs.git - sudo -u nonroot just push-packages