File tree 7 files changed +25
-29
lines changed 7 files changed +25
-29
lines changed Original file line number Diff line number Diff line change 1
- /.idea
2
- /* .iml
3
-
4
- /.dev
5
1
/bin
6
- /dist
7
- /release
8
- /site
9
- /coverage.txt
Original file line number Diff line number Diff line change 15
15
env :
16
16
DOCKERHUB_SLUG : crazymax/undock
17
17
GHCR_SLUG : ghcr.io/${{ github.repository }}
18
+ DESTDIR : ./bin
18
19
19
20
jobs :
20
21
validate :
54
55
name : Upload coverage
55
56
uses : codecov/codecov-action@v3
56
57
with :
57
- file : . /coverage.txt
58
+ directory : ${{ env.DESTDIR }} /coverage
58
59
59
60
build :
60
61
runs-on : ubuntu-latest
@@ -121,7 +122,7 @@ jobs:
121
122
uses : actions/upload-artifact@v3
122
123
with :
123
124
name : undock
124
- path : . /release/*
125
+ path : ${{ env.DESTDIR }} /release/*
125
126
if-no-files-found : error
126
127
-
127
128
name : Build image
@@ -140,7 +141,7 @@ jobs:
140
141
with :
141
142
draft : true
142
143
files : |
143
- release/*
144
+ ${{ env.DESTDIR }}/ release/*
144
145
env :
145
146
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
146
147
-
Original file line number Diff line number Diff line change 11
11
- ' v*'
12
12
pull_request :
13
13
14
+ env :
15
+ DESTDIR : ./bin
16
+
14
17
jobs :
15
18
publish :
16
19
runs-on : ubuntu-latest
39
42
uses : crazy-max/ghaction-github-pages@v3
40
43
with :
41
44
target_branch : gh-pages
42
- build_dir : site
45
+ build_dir : ${{ env.DESTDIR }}/ site
43
46
jekyll : false
44
47
env :
45
48
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 13
13
- ' **.md'
14
14
pull_request :
15
15
16
+ env :
17
+ DESTDIR : ./bin
18
+
16
19
jobs :
17
20
registry :
18
21
runs-on : ubuntu-latest
63
66
flags="${flags} --include ${{ matrix.include }}"
64
67
fi
65
68
set -x
66
- ./bin /undock ${flags} ${{ matrix.image }} ./dist
69
+ ${{ env.DESTDIR }}/build /undock ${flags} ${{ matrix.image }} ./dist
67
70
-
68
71
name : Dist content
69
72
run : |
@@ -101,7 +104,7 @@ jobs:
101
104
-
102
105
name : Run
103
106
run : |
104
- ./bin /undock --rm-dist --include /hello docker-daemon://image:local ./dist
107
+ ${{ env.DESTDIR }}/build /undock --rm-dist --include /hello docker-daemon://image:local ./dist
105
108
-
106
109
name : Dist content
107
110
run : |
@@ -129,7 +132,7 @@ jobs:
129
132
-
130
133
name : Run
131
134
run : |
132
- ./bin /undock --rm-dist docker-archive://archive.tar ./dist
135
+ ${{ env.DESTDIR }}/build /undock --rm-dist docker-archive://archive.tar ./dist
133
136
-
134
137
name : Dist content
135
138
run : |
Original file line number Diff line number Diff line change 1
- /.idea
2
- /* .iml
3
-
4
- /.dev
5
1
/bin
6
- /dist
7
- /release
8
- /coverage.txt
Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ variable "GO_VERSION" {
2
2
default = " 1.19"
3
3
}
4
4
5
+ variable "DESTDIR" {
6
+ default = " ./bin"
7
+ }
8
+
5
9
# GITHUB_REF is the actual ref that triggers the workflow and used as version
6
10
# when tag is pushed! https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
7
11
variable "GITHUB_REF" {
@@ -27,13 +31,13 @@ group "default" {
27
31
target "binary" {
28
32
inherits = [" _common" ]
29
33
target = " binary"
30
- output = [" ./bin " ]
34
+ output = [" ${ DESTDIR } /build " ]
31
35
}
32
36
33
37
target "artifact" {
34
38
inherits = [" _common" ]
35
39
target = " artifact"
36
- output = [" ./dist " ]
40
+ output = [" ${ DESTDIR } /artifact " ]
37
41
}
38
42
39
43
target "artifact-all" {
@@ -56,9 +60,9 @@ target "artifact-all" {
56
60
57
61
target "release" {
58
62
target = " release"
59
- output = [" . /release" ]
63
+ output = [" ${ DESTDIR } /release" ]
60
64
contexts = {
61
- artifacts = " ./dist "
65
+ artifacts = " ${ DESTDIR } /artifact "
62
66
}
63
67
}
64
68
@@ -86,7 +90,7 @@ target "image-all" {
86
90
target "test" {
87
91
inherits = [" _common" ]
88
92
target = " test-coverage"
89
- output = [" . " ]
93
+ output = [" ${ DESTDIR } /coverage " ]
90
94
}
91
95
92
96
target "vendor" {
@@ -106,7 +110,7 @@ target "gomod-outdated" {
106
110
target "docs" {
107
111
dockerfile = " ./hack/docs.Dockerfile"
108
112
target = " release"
109
- output = [" . /site" ]
113
+ output = [" ${ DESTDIR } /site" ]
110
114
}
111
115
112
116
group "validate" {
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ cd undock
10
10
# build docker image and output to docker with undock:local tag (default)
11
11
docker buildx bake
12
12
13
- # build binary in ./bin/undock
13
+ # build binary in ./bin/build/ undock
14
14
docker buildx bake binary
15
15
16
16
# build artifact
You can’t perform that action at this time.
0 commit comments