publish #11
This file contains 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: 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 |