diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9269d3b..c4c57a9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -23,6 +23,8 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 1 + submodules: true + ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} - name: Create non_root user run: | useradd nonroot && mkdir /home/nonroot && chown -R nonroot:nonroot /home/nonroot @@ -44,12 +46,12 @@ 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: | + ls -al ~/.ssh sudo -u nonroot just makepkg_flags=$makepkg_flags all - name: Show sedspkg diff run: | @@ -57,11 +59,4 @@ jobs: 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