-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (23 loc) · 917 Bytes
/
cd.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: Docker Image CI
on:
push:
tags:
- "*"
jobs:
build_push:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v3
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Install TypeScript and build
run: npm install --no-save typescript adroi.d.ea && npx tsc
- name: Release
uses: softprops/action-gh-release@v1
- name: Build the Docker image
run: docker build . --file Dockerfile --tag adanea/adroid_ea:$RELEASE_VERSION && docker tag adanea/adroid_ea:$RELEASE_VERSION adanea/adroid_ea:latest
- name: docker login
run: echo '${{ secrets.DOCKER_TOKEN }}' | docker login --username adanea --password-stdin
- name: docker push
run: docker push adanea/adroid_ea:$RELEASE_VERSION && docker push adanea/adroid_ea:latest