diff --git a/.github/workflows/update-repository.yml b/.github/workflows/update-repository.yml new file mode 100644 index 0000000000..101df3d29a --- /dev/null +++ b/.github/workflows/update-repository.yml @@ -0,0 +1,26 @@ +name: Update package repository + +on: + workflow_dispatch: + workflow_run: + workflows: ["Build kernel packages"] + types: + - completed +jobs: + + repository: + name: Update package repository + runs-on: [self-hosted, Linux, local] + if: ${{ github.repository_owner == 'Armbian' }} + steps: + + - name: Install SSH key for repository + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.KEY_REPOSITORY }} + name: id_repository # optional + known_hosts: ${{ secrets.KNOWN_HOSTS_REPOSITORY }} + if_key_exists: replace + + - name: Update repository + run: ssh -T -i ~/.ssh/id_repository ${{ secrets.USER_REPOSITORY }}@${{ secrets.HOST_REPOSITORY }}