File tree Expand file tree Collapse file tree 1 file changed +26
-10
lines changed Expand file tree Collapse file tree 1 file changed +26
-10
lines changed Original file line number Diff line number Diff line change 1- name : Docker Image CI
1+ # YAML -*- mode: yaml; tab-width: 2; indent-tabs-mode: nil; coding: utf-8 -*-
2+ ---
23
3- on :
4+ name : Build in docker
5+
6+ on : # yamllint disable-line rule:truthy
47 push :
5- branches : [ '*' ]
6- pull_request :
7- branches : [ '*' ]
88
99jobs :
1010 build :
11+ env :
12+ project-name : unifysdk
1113 runs-on : ubuntu-22.04
1214 steps :
13- - uses : actions/checkout@v4.1.1
14- with :
15- fetch-depth : 0
16- - name : Build Docker image from sources
17- run : docker build .
15+ - uses : actions/checkout@v4.1.1
16+ with :
17+ fetch-depth : 0
18+ - id : describe
19+ name : Describe HEAD
20+ run : |
21+ echo "describe=$(git describe --tags --always || echo 0)" | tee $GITHUB_OUTPUT
22+ - name : Build Docker image from sources
23+ run : docker build --tag "${{ env.project-name }}:latest" .
24+ - name : Extract artifacts
25+ run : |
26+ container=$(docker create "${{ env.project-name }}:latest")
27+ docker cp ${container}:/usr/local/opt/${{ env.project-name }}/build/dist .
28+ - name : Upload artifacts
29+ uses : actions/upload-artifact@v4
30+ with :
31+ name : ${{ github.event.repository.name }}-${{ steps.describe.outputs.describe }}
32+ path : dist/
33+
You can’t perform that action at this time.
0 commit comments