forked from christroutner/slpserve
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (28 loc) · 1.12 KB
/
main.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
31
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build docker image
run: |
export TAG_SLPSERVE=$(git describe --always --tags --dirty --abbrev=7 | sed 's/^.*\(.\{7\}\)/\1/')
docker build -t actorforth/slpserve:$TAG_SLPSERVE -t actorforth/slpserve:latest ./
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.INFRA_USER_NAME }}
password: ${{ secrets.INFRA_USER_TOKEN }}
- name: Push docker images
run: |
docker push actorforth/slpserve:$(git describe --always --tags --dirty --abbrev=7 | sed 's/^.*\(.\{7\}\)/\1/')
docker push actorforth/slpserve:latest