1+ name : Publish Docker image
2+
3+ on :
4+ release :
5+ types : [published]
6+ push :
7+ branches : [master]
8+
9+ jobs :
10+ push_to_registry :
11+ name : Push Beacon Docker image to Docker Hub
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v1
15+ - name : Login to DockerHub Registry
16+ run : echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
17+ - name : Get the version
18+ id : vars
19+ run : echo ::set-output name=tag::$(echo ${GITHUB_REF:10})
20+ - name : Build the tagged Docker image
21+ run : docker build . --file Dockerfile --tag cscfi/beacon-python:${{steps.vars.outputs.tag}}
22+ - name : Push the tagged Docker image
23+ run : docker push cscfi/beacon-python:${{steps.vars.outputs.tag}}
24+ - name : Build the latest Docker image
25+ run : docker build . --file Dockerfile --tag cscfi/beacon-python:latest
26+ - name : Push the latest Docker image
27+ run : docker push cscfi/beacon-python:latest
28+ push_data_to_registry :
29+ name : Push Dataloader Docker image to Docker Hub
30+ runs-on : ubuntu-latest
31+ steps :
32+ - uses : actions/checkout@v1
33+ - name : Login to DockerHub Registry
34+ run : echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
35+ - name : Get the version
36+ id : vars
37+ run : echo ::set-output name=tag::$(echo ${GITHUB_REF:10})
38+ - name : Build the tagged Docker image
39+ run : |
40+ pushd deploy/test
41+ docker build . --file Dockerfile --tag cscfi/beacon-dataloader:${{steps.vars.outputs.tag}}
42+ - name : Push the tagged Docker image
43+ run : docker push cscfi/beacon-dataloader:${{steps.vars.outputs.tag}}
44+ - name : Build the latest Docker image
45+ run : |
46+ pushd deploy/test
47+ docker build . --file Dockerfile --tag cscfi/beacon-dataloader:latest
48+ - name : Push the latest Docker image
49+ run : docker push cscfi/beacon-dataloader:latest
0 commit comments