-
Notifications
You must be signed in to change notification settings - Fork 4
39 lines (38 loc) · 1.39 KB
/
publish.yml
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
name: publish
on:
push:
pull_request:
schedule:
- cron: "0 7 * * 2"
jobs:
build-high-x-parton-pdf-inference-docker-image:
runs-on: ubuntu-latest
name: Build high-x-parton-pdf-inference Docker image
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Check if the Docker file was changed
id: changed-docker-files
uses: tj-actions/changed-files@v38
with:
files: Dockerfile
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build the high-x-parton-pdf-inference Docker image on the change of Dockerfile
if: steps.changed-docker-files.outputs.any_changed == 'true'
run: |
docker build . --tag ghcr.io/mppmu/high-x-parton-pdf-inference:latest
docker run ghcr.io/mppmu/high-x-parton-pdf-inference:latest
docker push ghcr.io/mppmu/high-x-parton-pdf-inference
- name: Build the high-x-parton-pdf-inference Docker image on schedule
if: ${{ github.event_name == 'schedule' }}
run: |
docker build . --tag ghcr.io/mppmu/high-x-parton-pdf-inference:latest
docker run ghcr.io/mppmu/high-x-parton-pdf-inference:latest
docker push ghcr.io/mppmu/high-x-parton-pdf-inference