diff --git a/.github/workflows/apbx.yaml b/.github/workflows/apbx.yaml index dd4bb58cce..c910d4241d 100644 --- a/.github/workflows/apbx.yaml +++ b/.github/workflows/apbx.yaml @@ -8,6 +8,11 @@ on: paths: - 'src/**' +env: + PACKAGE_PATH: "..\Atlas\src\playbook\Executables\AtlasModules\Packages" + SXSC_REPO: "https://github.com/Atlas-OS/sxsc" + ZIP_PASSWORD: "malte" + jobs: package-build: runs-on: windows-latest @@ -40,7 +45,7 @@ jobs: - name: Clone the sxsc repository id: clone_repo run: | - git clone --depth=1 https://github.com/Atlas-OS/sxsc + git clone --depth=1 ${{ env.SXSC_REPO }} Copy-Item -Path "configs" -Destination ".\sxsc\configs" -Recurse -Force working-directory: .. if: ${{ env.CBS_CHANGES == 'true' }} @@ -50,7 +55,7 @@ jobs: Write-Host "Installing dependencies..." pip install -r requirements.txt | Out-Null - $packagePath = "..\Atlas\src\playbook\Executables\AtlasModules\Packages" + $packagePath = ${{ env.PACKAGE_PATH }} mkdir $packagePath -EA SilentlyContinue | Out-Null Get-ChildItem -Recurse "configs" -Filter *.yaml | ForEach-Object { Write-Host "`nProcessing $($_.Name)`n------------------------------------------------------" @@ -106,14 +111,16 @@ jobs: sed -i '//d' playbook.conf echo "Change description of playbook..." sed -i 's|.*<\/Description>|Experimental testing version of the Atlas Playbook, built with GitHub Actions from commit ${{ github.sha }}. Be aware of these builds being potentially unstable and buggy!|g' playbook.conf + - name: Create playbook (ZIP/APBX password is malte) if: ${{ steps.config-playbook.outcome != 'skipped' }} run: | cd src/playbook echo "Making a renamed password protected (malte) ZIP of playbook files..." - zip -r -P malte "Atlas Playbook ${GITHUB_SHA::8}.apbx" . -x "local-build.cmd" + zip -r -P ${{ env.ZIP_PASSWORD }} "Atlas Playbook ${GITHUB_SHA::8}.apbx" . -x "local-build.cmd" echo "Move the .abpx playbook into the 'Release ZIP' to be released as an artifact with the additional files..." mv "Atlas Playbook ${GITHUB_SHA::8}.apbx" "../release-zip" + - name: Upload artifact uses: actions/upload-artifact@v3 if: ${{ steps.config-playbook.outcome != 'skipped' }} @@ -121,4 +128,4 @@ jobs: name: Atlas Playbook path: | src/release-zip/* - if-no-files-found: error \ No newline at end of file + if-no-files-found: error