name: Update hash on: workflow_dispatch: workflow_call: inputs: uploading: type: string secrets: GPG_KEY1: required: true GPG_PASSPHRASE1: required: true GPG_KEY2: required: true GPG_PASSPHRASE2: required: true SCRIPTS_ACCESS_TOKEN: required: true KEY_TORRENTS: required: true KNOWN_HOSTS_UPLOAD: required: true jobs: Hash: name: Update runs-on: fast if: ${{ github.repository_owner == 'Armbian' }} steps: - name: Remove previous artefacts if any run: | sudo rm -rf changes 2>/dev/null || true - name: Download changes uses: actions/download-artifact@v3.0.2 with: name: changes - name: Read value run: | [ -s changes ] || echo "SKIP=yes" >> $GITHUB_ENV - name: Checkout Armbian build script if: ${{ env.SKIP != 'yes' }} uses: actions/checkout@v3.3.0 with: fetch-depth: 0 repository: armbian/build path: build ref: nightly clean: false - name: Checkout Armbian support scripts if: ${{ env.SKIP != 'yes' }} uses: actions/checkout@v3.3.0 with: fetch-depth: 0 repository: armbian/scripts token: ${{ secrets.SCRIPTS_ACCESS_TOKEN }} path: scripts clean: true - name: Import GPG key if: ${{ env.SKIP != 'yes' }} uses: crazy-max/ghaction-import-gpg@v5 with: gpg_private_key: ${{ secrets.GPG_KEY2 }} passphrase: ${{ secrets.GPG_PASSPHRASE2 }} workdir: scripts git_user_signingkey: true git_commit_gpgsign: true - name: Download artefacts if: ${{ env.SKIP != 'yes' }} uses: actions/download-artifact@v3.0.2 with: name: hash - name: Update scripts if: ${{ env.SKIP != 'yes' }} run: | sudo rsync -ar --remove-source-files *.git* scripts/hash-beta/ || true cd scripts sudo chown -R $USER:$USER .git if git status --porcelain | grep .; then git config --global user.email "info@armbian.com" git config --global user.name "Armbianworker" git config pull.rebase false git pull git add . git commit --allow-empty -m "Update hashes for ${{ env.FILE_DEST }} repository" git push fi