File tree Expand file tree Collapse file tree 2 files changed +47
-3
lines changed Expand file tree Collapse file tree 2 files changed +47
-3
lines changed Original file line number Diff line number Diff line change 4
4
push :
5
5
branches :
6
6
- main
7
- pull_request :
8
- branches :
9
- - ' **'
7
+
10
8
11
9
jobs :
12
10
frontend :
Original file line number Diff line number Diff line change
1
+ name : Check Pr
2
+
3
+ on :
4
+ pull_request :
5
+ branches :
6
+ - ' **'
7
+
8
+ jobs :
9
+ build :
10
+ name : Build Frontend
11
+ runs-on : [ self-hosted ]
12
+ outputs :
13
+ version : " ${{ steps.version.outputs.version }}"
14
+
15
+ steps :
16
+ - name : Checkout code
17
+ uses : actions/checkout@v4
18
+
19
+ - name : Print Event
20
+ run : |
21
+ echo "Event Name: ${{ github.event_name }}"
22
+ echo "Repository: ${{ github.repository }}"
23
+ echo "SHA: ${{ github.sha }}"
24
+ echo "Ref: ${{ github.ref }}"
25
+ echo "Action: ${{ github.action }}"
26
+ echo "Actor: ${{ github.actor }}"
27
+ echo "Workflow Run ID: ${{ github.run_id }}"
28
+ echo "Head Repository: ${{ github.head_repository }}"
29
+ echo "Base Repository: ${{ github.base_repository }}"
30
+
31
+ - name : Get version
32
+ id : version
33
+ run : |
34
+ if [[ -n "$GITHUB_REF" && "$GITHUB_REF" == "refs/tags/"* ]]; then
35
+ echo "tag version"
36
+ echo "::set-output name=version::${GITHUB_REF/refs\/tags\//}"
37
+ else
38
+ echo "commit version"
39
+ echo "::set-output name=version::${{ github.sha }}"
40
+ fi
41
+
42
+ - name : Build and Push GitDataWeb
43
+ run : |
44
+ docker build -t gitdatateam/gitdataweb:${{ steps.version.outputs.version }} .
45
+ docker rmi $(docker images -f "dangling=true" -q)
46
+
You can’t perform that action at this time.
0 commit comments