diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9269d3b..85758ef 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -20,9 +20,6 @@ jobs: - name: Install latest git run: | pacman -Syy --noconfirm git - - uses: actions/checkout@v3 - with: - fetch-depth: 1 - name: Create non_root user run: | useradd nonroot && mkdir /home/nonroot && chown -R nonroot:nonroot /home/nonroot @@ -41,15 +38,20 @@ jobs: - name: Install dependencies run: | pacman -Syyu --noconfirm && pacman -S --noconfirm just base-devel sudo xorgproto openssh + - uses: webfactory/ssh-agent@v0.8.0 + with: + ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} + - uses: actions/checkout@v3 + with: + fetch-depth: 1 + submodules: true + ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} - 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 - 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