Files
scripts/.github/workflows/deploy.yml
dependabot[bot] fb87d96ed7 Bump actions/download-artifact from 3.0.1 to 3.0.2 (#36)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3.0.1...v3.0.2)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-17 12:07:11 +01:00

100 lines
2.5 KiB
YAML

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