-
Notifications
You must be signed in to change notification settings - Fork 8
52 lines (45 loc) · 1.77 KB
/
docker-deploy.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Deploy Docker Image
on:
release:
types: [published, prereleased]
jobs:
build:
name: Build and Push
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
8.0.x
- name: Log Variables
run: |
echo "action - ${{ github.event.action }}"
echo "url - ${{ github.event.release.url }}"
echo "assets_url - ${{ github.event.release.assets_url }}"
echo "id - ${{ github.event.release.id }}"
echo "tag_name - ${{ github.event.release.tag_name }}"
echo "assets - ${{ github.event.assets }}"
echo "assets[0] - ${{ github.event.assets[0] }}"
- name: Modify Tag Name
id: modify_tag
run: |
TAG_NAME="${{ github.event.release.tag_name }}"
MODIFIED_TAG_NAME=$(echo $TAG_NAME | sed 's/^v//' | sed 's/-release//')
echo "MODIFIED_TAG_NAME=$MODIFIED_TAG_NAME" >> $GITHUB_ENV
echo "Modified tag name: $MODIFIED_TAG_NAME"
- uses: cschleiden/replace-tokens@v1
with:
files: '["**/Dockerfile.Release"]'
env:
VERSION: ${{ env.MODIFIED_TAG_NAME }}
VERSIONTAG: ${{ github.event.release.tag_name }}
- name: Verify Dockerfile
run: cat src/Angor/Server/Dockerfile.Release
- name: Build the Docker container image
run: docker build -f "./src/Angor/Server/Dockerfile.Release" -t blockcore/angor:latest -t blockcore/angor:${{ env.MODIFIED_TAG_NAME }} --label "unstable=true" "."
- name: Login and Push to Docker Registry
run: |
docker login -u "sondreb" -p "${{secrets.DOCKER_KEY}}"
docker push --all-tags blockcore/angor