Skip to content

Commit 572183d

Browse files
committed
publishing a docker image for development branch
1 parent c422587 commit 572183d

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

.github/workflows/docker.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Docker Image
2+
3+
on:
4+
push:
5+
branches: [ development ]
6+
pull_request:
7+
branches: [ development ]
8+
jobs:
9+
push_to_registries:
10+
name: Push Docker image to multiple registries
11+
runs-on: ubuntu-latest
12+
permissions:
13+
packages: write
14+
contents: read
15+
steps:
16+
- name: Check out the repo
17+
uses: actions/checkout@v2
18+
# If we want to publish an image of PhASAR to the official docker hub we
19+
# can just use the following code and set the corresponding secrets.
20+
# - name: Log in to Docker Hub
21+
# uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
22+
# with:
23+
# username: ${{ secrets.DOCKER_USERNAME }}
24+
# password: ${{ secrets.DOCKER_TOKEN }}
25+
26+
- name: Log in to the Container registry
27+
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
28+
with:
29+
registry: ghcr.io
30+
username: ${{ github.actor }}
31+
password: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Extract metadata (tags, labels) for Docker
34+
id: meta
35+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
36+
with:
37+
images: ghcr.io/${{ github.repository }}
38+
# here we could add a second image for the official docker registry
39+
# sse/phasar
40+
- name: Build and push Docker images
41+
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
42+
with:
43+
context: .
44+
push: true
45+
tags: ${{ steps.meta.outputs.tags }}
46+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)