Skip to content

Commit eb1718a

Browse files
authored
Create docker-CI.yml
1 parent 10e7fe1 commit eb1718a

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/docker-CI.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Docker Build and Push
2+
3+
on:
4+
push:
5+
branches: [ master, develop ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Extract branch name
13+
shell: bash
14+
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
15+
id: extract_branch
16+
- name: Build the Docker image
17+
run: |
18+
docker build -t registry.tech4comp.dbis.rwth-aachen.de/rwthacis/sbf-utils:${{ steps.extract_branch.outputs.branch }} .
19+
- name: Push to registry
20+
env:
21+
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
22+
DOCKER_PW: ${{ secrets.DOCKER_PW }}
23+
run: |
24+
docker login -u $DOCKER_USERNAME -p $DOCKER_PW registry.tech4comp.dbis.rwth-aachen.de
25+
docker push registry.tech4comp.dbis.rwth-aachen.de/rwthacis/sbf-utils:${{ steps.extract_branch.outputs.branch }}

0 commit comments

Comments
 (0)