Add package tracking script and enhance build workflow for version management #213
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check to make sure Dockerfile works | |
| on: | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| schedule: | |
| # Run the workflow on the 1st of every month at midnight | |
| - cron: '0 0 1 * *' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 120 # Add a timeout to prevent hung builds | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Environment | |
| run: | | |
| echo "Setting up environment..." | |
| mkdir -p out | |
| chmod +x scripts/entrypoint.sh | |
| chmod +x scripts/select-mirrors.sh | |
| chmod +x profiledef.sh | |
| - name: Build Docker Image | |
| run: | | |
| echo "Building Docker image..." | |
| docker build -t arch-iso-builder . || { | |
| echo "::error::Docker build failed" | |
| exit 1 | |
| } | |
| - name: Validate Configuration | |
| run: | | |
| echo "Validating configuration..." | |
| docker run --rm -v "$(pwd)":/workdir arch-iso-builder validate || { | |
| echo "::error::Configuration validation failed" | |
| exit 1 | |
| } | |
| - name: Build ISO | |
| run: | | |
| echo "Building ISO..." | |
| # Create a small-scale test build with output to verify the process works | |
| docker run --rm --privileged \ | |
| -v "$(pwd)":/workdir \ | |
| arch-iso-builder build out work || { | |
| echo "::error::ISO build failed" | |
| exit 1 | |
| } | |
| # Verify that output directory contains files | |
| if [ ! -d "out" ] || [ -z "$(ls -A out 2>/dev/null)" ]; then | |
| echo "::error::Output directory is empty or does not exist" | |
| exit 1 | |
| else | |
| echo "ISO build process completed successfully!" | |
| ls -la out | |
| fi |