Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/generator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Dockerfile Generator
on:
push:
paths:
- generator

jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- name: Cache .stack directory
uses: actions/[email protected]
with:
path: ~/.stack
key: ${{ runner.os }}-stack-${{ hashFiles('generator/stack.yaml.lock') }}

- name: Cache build artifacts
uses: actions/[email protected]
with:
path: generator/.stack-work
key: ${{ runner.os }}-stack-work-${{ hashFiles('generator/stack.yaml.lock', 'generator/generator.cabal') }}
- name: Install Haskell toolchain and stack
uses: haskell-actions/[email protected]
with:
enable-stack: true

- name: Set up Stack project
working-directory: generator
run: stack setup
- name: Build generator
working-directory: generator
run: stack build --no-terminal
- name: Run generator
working-directory: generator
run: stack exec generator -- --help

- name: Copy generator binary to artifacts
working-directory: generator
run: |
mkdir -p ../artifacts
stack --local-bin-path=../artifacts install
- name: Upload generator artifact
uses: actions/[email protected]
with:
name: dockerfile-generator
path: artifacts/generator