File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Dockerfile Generator
2+ on :
3+ push :
4+ paths :
5+ - generator
6+
7+ jobs :
8+ build :
9+ runs-on : ubuntu-22.04
10+ steps :
11+ - uses : actions/checkout@v5.0.0
12+ - name : Cache .stack directory
13+ uses : actions/cache@v4.3.0
14+ with :
15+ path : ~/.stack
16+ key : ${{ runner.os }}-stack-${{ hashFiles('generator/stack.yaml.lock') }}
17+
18+ - name : Cache build artifacts
19+ uses : actions/cache@v4.3.0
20+ with :
21+ path : generator/.stack-work
22+ key : ${{ runner.os }}-stack-work-${{ hashFiles('generator/stack.yaml.lock', 'generator/generator.cabal') }}
23+ - name : Install Haskell toolchain and stack
24+ uses : haskell-actions/setup@v2.8.2
25+ with :
26+ enable-stack : true
27+
28+ - name : Set up Stack project
29+ working-directory : generator
30+ run : stack setup
31+ - name : Build generator
32+ working-directory : generator
33+ run : stack build --no-terminal
34+ - name : Run generator
35+ working-directory : generator
36+ run : stack exec generator -- --help
37+
38+ - name : Copy generator binary to artifacts
39+ working-directory : generator
40+ run : |
41+ mkdir -p ../artifacts
42+ stack --local-bin-path=../artifacts install
43+ - name : Upload generator artifact
44+ uses : actions/upload-artifact@v4.6.2
45+ with :
46+ name : dockerfile-generator
47+ path : artifacts/generator
You can’t perform that action at this time.
0 commit comments