Skip to content

Commit

Permalink
feat(apbx.yaml): use env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Xyueta committed Aug 6, 2023
1 parent ab5ac32 commit 218b32a
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/apbx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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' }}
Expand All @@ -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------------------------------------------------------"
Expand Down Expand Up @@ -106,19 +111,21 @@ jobs:
sed -i '/<ProductCode>/d' playbook.conf
echo "Change description of playbook..."
sed -i 's|<Description>.*<\/Description>|<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!</Description>|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' }}
with:
name: Atlas Playbook
path: |
src/release-zip/*
if-no-files-found: error
if-no-files-found: error

0 comments on commit 218b32a

Please sign in to comment.