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/checkout@v5.0.0
- name: Cache .stack directory
uses: actions/cache@v4.3.0
with:
path: ~/.stack
key: ${{ runner.os }}-stack-${{ hashFiles('generator/stack.yaml.lock') }}

- name: Cache build artifacts
uses: actions/cache@v4.3.0
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/setup@v2.8.2
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/upload-artifact@v4.6.2
with:
name: dockerfile-generator
path: artifacts/generator