-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (32 loc) · 1.03 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
name: Publish Docker Images
on:
push:
branches:
- main
tags:
- v*
jobs:
build-and-publish:
name: Build and publish Docker images to Docker Hub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Build and Publish to Registry
if: "!(startsWith(github.ref, 'refs/tags/'))"
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: pyhf/pyhf-validation
dockerfile: docker/Dockerfile
tags: latest,root6.20.00,root6.20.00-python3.7
- name: Build and Publish to Registry with Release Tag
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: pyhf/pyhf-validation
dockerfile: docker/Dockerfile
tags: latest,latest-stable,root6.20.00,root6.20.00-python3.7
tag_with_ref: true