Skip to content
Open
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
23 changes: 15 additions & 8 deletions .github/workflows/generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
default: false
required: false


jobs:
build:
runs-on: ubuntu-22.04
Expand All @@ -22,26 +21,33 @@ jobs:
with:
path: ~/.stack
key: ${{ runner.os }}-stack-${{ hashFiles('generator/stack.yaml.lock') }}
restore-keys: |
${{ runner.os }}-stack-
- name: Install Haskell toolchain and stack
uses: haskell-actions/[email protected]
with:
enable-stack: true

- 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
restore-keys: |
${{ runner.os }}-stack-work-

- name: Set up Stack project
working-directory: generator
run: stack setup
run: |
stack setup
Comment on lines +41 to +42
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The multi-line format using run: | is unnecessary for single-line commands. This adds verbosity without providing any benefit. Consider keeping the original single-line format:

run: stack setup

The multi-line format with | is typically reserved for commands that actually span multiple lines or need to preserve newlines.

Suggested change
run: |
stack setup
run: stack setup

Copilot uses AI. Check for mistakes.
- name: Build generator
working-directory: generator
run: stack build --no-terminal
run: |
stack build --no-terminal
Comment on lines +45 to +46
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The multi-line format using run: | is unnecessary for single-line commands. This adds verbosity without providing any benefit. Consider keeping the original single-line format:

run: stack build --no-terminal

The multi-line format with | is typically reserved for commands that actually span multiple lines or need to preserve newlines.

Suggested change
run: |
stack build --no-terminal
run: stack build --no-terminal

Copilot uses AI. Check for mistakes.
- name: Run generator
working-directory: generator
run: stack exec generator -- --help
run: |
stack exec generator -- --help
Comment on lines +49 to +50
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The multi-line format using run: | is unnecessary for single-line commands. This adds verbosity without providing any benefit. Consider keeping the original single-line format:

run: stack exec generator -- --help

The multi-line format with | is typically reserved for commands that actually span multiple lines or need to preserve newlines.

Suggested change
run: |
stack exec generator -- --help
run: stack exec generator -- --help

Copilot uses AI. Check for mistakes.

- name: Copy generator binary to artifacts
working-directory: generator
Expand All @@ -50,6 +56,7 @@ jobs:
stack --local-bin-path=../artifacts install
- name: Upload generated artifact to a release
uses: softprops/[email protected]
if: ${{ github.repository == 'haskell/docker-haskell' }}
with:
name: Generator
tag_name: generator-binary
Expand Down