-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (26 loc) · 1007 Bytes
/
ci.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
name: CI
on: push
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# get branch/tag name for later stages
- name: Branch name
id: branch_name
run: |
echo ::set-output name=SOURCE_BRANCH::$([[ $GITHUB_REF == refs/heads/* ]] && echo ${GITHUB_REF#refs/heads/} || echo "")
echo ::set-output name=SOURCE_TAG::$([[ $GITHUB_REF == refs/tags/* ]] && echo ${GITHUB_REF#refs/tags/} || echo "")
- name: Build the aeolus-client docker image and tag it with the branch name
# TODO handle tag pushes
run: |
docker build -t eoxa/aeolus-server:${{ steps.branch_name.outputs.SOURCE_BRANCH }} .
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
if: success()
- name: Push docker image(s)
run: docker push eoxa/aeolus-server
if: success()