Nightly Docker Build #33
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: Nightly Docker Build | |
| on: | |
| schedule: | |
| # Run every night at 2 AM UTC | |
| - cron: '0 2 * * *' | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: # Allow manual triggering | |
| env: | |
| REGISTRY_NAME: ${{ secrets.ACR_LOGIN_SERVER }} | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - image_name: aspnet-noble-ghostscript | |
| dockerfile_path: . | |
| - image_name: aspnet-noble-ghostscript-xps | |
| dockerfile_path: ./XPS | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Log in to Azure Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ secrets.ACR_LOGIN_SERVER }} | |
| username: ${{ secrets.ACR_USERNAME }} | |
| password: ${{ secrets.ACR_PASSWORD }} | |
| - name: Build Docker image | |
| run: docker build -t ${{ secrets.ACR_LOGIN_SERVER }}/${{ matrix.image_name }}:latest ${{ matrix.dockerfile_path }} | |
| - name: Push Docker image | |
| run: docker push ${{ secrets.ACR_LOGIN_SERVER }}/${{ matrix.image_name }}:latest |