From 7409e24427d258e6c1a9a65b3c2bb9ba45ffd902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Pe=C4=8Dovnik?= Date: Thu, 8 Dec 2022 15:15:03 +0100 Subject: [PATCH] Improve build train logic - bump version first (#4542) * Cleaning upload * Update build-train.yml * Update build-train.yml * Update build-train.yml --- .github/workflows/build-train.yml | 71 ++++++++++++++++++------------- 1 file changed, 42 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build-train.yml b/.github/workflows/build-train.yml index 923cdac79b..faae7e2fe7 100644 --- a/.github/workflows/build-train.yml +++ b/.github/workflows/build-train.yml @@ -44,6 +44,45 @@ jobs: all_but_latest: true access_token: ${{ secrets.GITHUB_TOKEN }} + ########################################################################################## + # # + # Clean upload folder # + # # + ########################################################################################## + + Cleaning: + permissions: + contents: none + needs: Cancel + if: ${{ success() && github.repository_owner == 'Armbian' }} + uses: armbian/scripts/.github/workflows/clean-upload.yml@master + secrets: + KEY_TORRENTS: ${{ secrets.KEY_TORRENTS }} + KNOWN_HOSTS_UPLOAD: ${{ secrets.KNOWN_HOSTS_UPLOAD }} + + ########################################################################################## + # # + # Bump with version if compilation succeeded # + # # + ########################################################################################## + + Bump: + needs: [Cleaning] + if: ${{ success() && github.repository_owner == 'Armbian' }} + uses: armbian/scripts/.github/workflows/update-version.yml@master + + with: + uploading: true + + secrets: + GPG_KEY1: ${{ secrets.GPG_KEY1 }} + GPG_PASSPHRASE1: ${{ secrets.GPG_PASSPHRASE1 }} + GPG_KEY2: ${{ secrets.GPG_KEY2 }} + GPG_PASSPHRASE2: ${{ secrets.GPG_PASSPHRASE2 }} + SCRIPTS_ACCESS_TOKEN: ${{ secrets.SCRIPTS_ACCESS_TOKEN }} + KEY_TORRENTS: ${{ secrets.KEY_TORRENTS }} + KNOWN_HOSTS_UPLOAD: ${{ secrets.KNOWN_HOSTS_UPLOAD }} + ########################################################################################## # # # Merge master into nighly image from which we build packages # @@ -52,7 +91,7 @@ jobs: Merge: name: Merging - needs: Cancel + needs: [Bump] if: ${{ github.repository_owner == 'Armbian' }} uses: armbian/scripts/.github/workflows/merge-from-branch.yml@master @@ -333,37 +372,11 @@ jobs: USER_REPOSITORY: ${{ secrets.USER_REPOSITORY }} HOST_REPOSITORY: ${{ secrets.HOST_REPOSITORY }} KNOWN_HOSTS_REPOSITORY: ${{ secrets.KNOWN_HOSTS_REPOSITORY }} - - ########################################################################################## - # # - # Bump with version if compilation succeeded # - # # - ########################################################################################## - - Bump: - - needs: [apt-armbian-com,beta-armbian-com,sync-servers] - if: ${{ success() && github.repository_owner == 'Armbian' }} - uses: armbian/scripts/.github/workflows/update-version.yml@master - - with: - - uploading: true - - secrets: - GPG_KEY1: ${{ secrets.GPG_KEY1 }} - GPG_PASSPHRASE1: ${{ secrets.GPG_PASSPHRASE1 }} - GPG_KEY2: ${{ secrets.GPG_KEY2 }} - GPG_PASSPHRASE2: ${{ secrets.GPG_PASSPHRASE2 }} - SCRIPTS_ACCESS_TOKEN: ${{ secrets.SCRIPTS_ACCESS_TOKEN }} - KEY_TORRENTS: ${{ secrets.KEY_TORRENTS }} - KNOWN_HOSTS_UPLOAD: ${{ secrets.KNOWN_HOSTS_UPLOAD }} - - + Clean: name: Clean - needs: [Bump] + needs: [apt-armbian-com,beta-armbian-com,sync-servers] runs-on: Linux if: ${{ success() && github.repository_owner == 'Armbian' }} steps: