forked from pytorch/test-infra
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (31 loc) · 816 Bytes
/
Copy pathdocker-build.yml
File metadata and controls
35 lines (31 loc) · 816 Bytes
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
name: Build and Publish Docker Images
on:
schedule:
- cron: "0 6 * * *"
push:
branches: [main]
paths:
- "docker/**"
pull_request:
paths:
- "docker/**"
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' && github.run_id }}-${{ github.event_name == 'schedule' }}
cancel-in-progress: true
jobs:
build:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/_docker-build.yml
with:
push: false
permissions:
contents: read
build-and-publish:
if: github.event_name != 'pull_request'
uses: ./.github/workflows/_docker-build.yml
with:
push: true
permissions:
contents: read
packages: write