Adjust action scripts to adjusted logic (#4605)

* Add new way of synching

* Add sync and torrent creation

* Update build-images.yml
This commit is contained in:
Igor Pečovnik 2022-12-24 09:43:40 +01:00 committed by GitHub
parent 1a59152009
commit d751ff51ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 84 additions and 37 deletions

View File

@ -484,10 +484,14 @@ jobs:
name: finish
needs: [x86,x86-desktop,x86-minimal,minimal,cli1,desktop1,cli2,desktop2,riscv64,riscv64-min,riscv64-x]
runs-on: [ubuntu-latest]
runs-on: [self-hosted, Linux, local]
if: ${{ github.repository_owner == 'Armbian' && github.event.inputs.choice != 'stable' && github.event.inputs.choice != 'rc' }}
steps:
- name: Runner prepare
uses: armbian/actions/runner-prepare@main
- name: Checkout repository
uses: actions/checkout@v3
with:
@ -519,3 +523,19 @@ jobs:
name: "Armbian ${{ env.VERSION }}"
allowUpdates: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Update mirrors
uses: armbian/actions/triggers@main
with:
KEY: ${{ secrets.KEY_SYNC_MIRRORS }}
USER: ${{ secrets.USER_REPOSITORY }}
HOST: ${{ secrets.HOST_REPOSITORY }}
KNOWN_HOSTS: ${{ secrets.KNOWN_HOSTS_REPOSITORY }}
- name: Sync images & recreate torrents
uses: armbian/actions/triggers@main
with:
KEY: ${{ secrets.KEY_RECREATE_TORRENT }}
USER: ${{ secrets.USER_REPOSITORY }}
HOST: ${{ secrets.HOST_REPOSITORY }}
KNOWN_HOSTS: ${{ secrets.KNOWN_HOSTS_REPOSITORY }}

View File

@ -325,58 +325,85 @@ jobs:
apt-armbian-com:
permissions:
contents: none
name: "Stable repository"
name: "Update stable"
needs: [Deploy]
if: ${{ success() && github.repository_owner == 'Armbian' }}
uses: armbian/scripts/.github/workflows/update-repository.yml@master
with:
KEY_ID: 'repository'
secrets:
KEY_REPOSITORY: ${{ secrets.KEY_REPOSITORY }}
USER_REPOSITORY: ${{ secrets.USER_REPOSITORY }}
HOST_REPOSITORY: ${{ secrets.HOST_REPOSITORY }}
KNOWN_HOSTS_REPOSITORY: ${{ secrets.KNOWN_HOSTS_REPOSITORY }}
if: ${{ github.repository_owner == 'Armbian' }}
runs-on: [self-hosted, Linux, local]
steps:
- name: Remove previous artefacts if any
run: |
sudo rm -rf changes 2>/dev/null || true
- name: Download changes
uses: actions/download-artifact@v3
with:
name: changes
- name: Check
run: |
[ -s changes ] || echo "SKIP=yes" >> $GITHUB_ENV
- if: ${{ env.SKIP != 'yes' }}
uses: armbian/actions/triggers@main
with:
KEY: ${{ secrets.KEY_REPOSITORY }}
USER: ${{ secrets.USER_REPOSITORY }}
HOST: ${{ secrets.HOST_REPOSITORY }}
KNOWN_HOSTS: ${{ secrets.KNOWN_HOSTS_REPOSITORY }}
beta-armbian-com:
permissions:
contents: none
name: "Nighly repository"
name: "Update beta"
needs: [Deploy]
if: ${{ success() && github.repository_owner == 'Armbian' }}
uses: armbian/scripts/.github/workflows/update-repository.yml@master
with:
KEY_ID: 'repository-beta'
secrets:
KEY_REPOSITORY: ${{ secrets.KEY_REPOSITORY_BETA }}
USER_REPOSITORY: ${{ secrets.USER_REPOSITORY }}
HOST_REPOSITORY: ${{ secrets.HOST_REPOSITORY }}
KNOWN_HOSTS_REPOSITORY: ${{ secrets.KNOWN_HOSTS_REPOSITORY }}
if: ${{ github.repository_owner == 'Armbian' }}
runs-on: [self-hosted, Linux, local]
steps:
- name: Remove previous artefacts if any
run: |
sudo rm -rf changes 2>/dev/null || true
- name: Download changes
uses: actions/download-artifact@v3
with:
name: changes
- name: Check
run: |
[ -s changes ] || echo "SKIP=yes" >> $GITHUB_ENV
- if: ${{ env.SKIP != 'yes' }}
uses: armbian/actions/triggers@main
with:
KEY: ${{ secrets.KEY_REPOSITORY_BETA }}
USER: ${{ secrets.USER_REPOSITORY }}
HOST: ${{ secrets.HOST_REPOSITORY }}
KNOWN_HOSTS: ${{ secrets.KNOWN_HOSTS_REPOSITORY }}
sync-servers:
permissions:
contents: none
name: "Sync servers"
needs: [apt-armbian-com,beta-armbian-com]
if: ${{ success() && github.repository_owner == 'Armbian' }}
uses: armbian/scripts/.github/workflows/sync-servers.yml@master
with:
KEY_ID: 'upload'
secrets:
KEY_UPLOAD: ${{ secrets.KEY_UPLOAD }}
USER_REPOSITORY: ${{ secrets.USER_REPOSITORY }}
HOST_REPOSITORY: ${{ secrets.HOST_REPOSITORY }}
KNOWN_HOSTS_REPOSITORY: ${{ secrets.KNOWN_HOSTS_REPOSITORY }}
if: ${{ github.repository_owner == 'Armbian' }}
runs-on: [self-hosted, Linux, local]
steps:
- name: Remove previous artefacts if any
run: |
sudo rm -rf changes 2>/dev/null || true
- name: Download changes
uses: actions/download-artifact@v3
with:
name: changes
- name: Check
run: |
[ -s changes ] || echo "SKIP=yes" >> $GITHUB_ENV
- if: ${{ env.SKIP != 'yes' }}
uses: armbian/actions/triggers@main
with:
KEY: ${{ secrets.KEY_SYNC_MIRRORS }}
USER: ${{ secrets.USER_REPOSITORY }}
HOST: ${{ secrets.HOST_REPOSITORY }}
KNOWN_HOSTS: ${{ secrets.KNOWN_HOSTS_REPOSITORY }}
Clean:
name: Clean
needs: [apt-armbian-com,beta-armbian-com,sync-servers]
needs: [sync-servers]
runs-on: Linux
if: ${{ success() && github.repository_owner == 'Armbian' }}
steps: