Skip to content

Commit 38d35c4

Browse files
committed
Docker Build and Push #3
1 parent 0bd2a8b commit 38d35c4

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

.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: [ main, 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/api-testing-bot:${{ 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/api-testing-bot:${{ steps.extract_branch.outputs.branch }}

0 commit comments

Comments
 (0)