-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.08 KB
/
docker-build.yml
File metadata and controls
41 lines (34 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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