├── .github └── workflows │ └── test.yaml ├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── defaults.dhall ├── defaults ├── Concurrency.dhall ├── Container.dhall ├── Env.dhall ├── Input.dhall ├── Job.dhall ├── JobEnv.dhall ├── On.dhall ├── Output.dhall ├── Secret.dhall ├── Service.dhall ├── Step.dhall ├── Strategy.dhall ├── Workflow.dhall ├── actions │ ├── Checkout.dhall │ └── HaskellSetup.dhall └── events │ ├── Delete.dhall │ ├── MergeGroup.dhall │ ├── PullRequest.dhall │ ├── PullRequestReview.dhall │ ├── PullRequestTarget.dhall │ ├── Push.dhall │ ├── Release.dhall │ ├── RepositoryDispatch.dhall │ ├── Schedule.dhall │ ├── WorkflowCall.dhall │ ├── WorkflowDispatch.dhall │ └── WorkflowRun.dhall ├── examples ├── checkout-complex.dhall ├── hello-world.dhall ├── out │ ├── checkout-complex.yaml │ ├── hello-world.yaml │ ├── release-scala.yaml │ └── scala.yaml ├── release-scala.dhall └── scala.dhall ├── package.dhall ├── schemas.dhall ├── schemas ├── Concurrency.dhall ├── Container.dhall ├── Env.dhall ├── Input.dhall ├── InputType.dhall ├── Job.dhall ├── JobEnv.dhall ├── On.dhall ├── Output.dhall ├── RunsOn.dhall ├── Secret.dhall ├── Service.dhall ├── Step.dhall ├── Strategy.dhall ├── Workflow.dhall ├── actions │ ├── Checkout.dhall │ └── HaskellSetup.dhall └── events │ ├── Delete.dhall │ ├── MergeGroup.dhall │ ├── PullRequest.dhall │ ├── PullRequestReview.dhall │ ├── PullRequestTarget.dhall │ ├── Push.dhall │ ├── Release.dhall │ ├── RepositoryDispatch.dhall │ ├── Schedule.dhall │ ├── WorkflowCall.dhall │ ├── WorkflowDispatch.dhall │ └── WorkflowRun.dhall ├── steps.dhall ├── steps ├── JamesIves │ ├── AuthSchema.dhall │ ├── Options.dhall │ └── ghpages-deploy.dhall ├── actions │ ├── cache.dhall │ ├── checkout.dhall │ ├── helloWorld.dhall │ ├── setup-haskell.dhall │ └── setup-java.dhall ├── cachix │ ├── cachix.dhall │ └── install-nix.dhall ├── echo.dhall ├── elastic │ └── elasticsearch.dhall ├── olafurpg │ ├── sbt-ci-release.dhall │ ├── setup-gpg.dhall │ └── setup-java.dhall └── run.dhall ├── types.dhall └── types ├── Concurrency.dhall ├── Container.dhall ├── ContinueOnError.dhall ├── Credentials.dhall ├── Defaults.dhall ├── Env.dhall ├── Input.dhall ├── InputType.dhall ├── Job.dhall ├── JobEnv.dhall ├── On.dhall ├── Output.dhall ├── Permission.dhall ├── PermissionAccess.dhall ├── RunsOn.dhall ├── Secret.dhall ├── Service.dhall ├── Step.dhall ├── Strategy.dhall ├── Workflow.dhall ├── actions ├── Checkout.dhall └── HaskellSetup.dhall └── events ├── Delete.dhall ├── MergeGroup.dhall ├── PullRequest.dhall ├── PullRequestReview.dhall ├── PullRequestTarget.dhall ├── Push.dhall ├── Release.dhall ├── RepositoryDispatch.dhall ├── Schedule.dhall ├── WorkflowCall.dhall ├── WorkflowDispatch.dhall ├── WorkflowRun.dhall ├── merge_group └── types.dhall ├── pull_request_target └── types.dhall └── release └── types.dhall /.github/workflows/test.yaml: -------------------------------------------------------------------------------- 1 | jobs: 2 | build: 3 | name: Check Frozen Imports 4 | runs-on: ubuntu-latest 5 | steps: 6 | - uses: actions/checkout@v2 7 | - uses: dhall-lang/setup-dhall@v4 8 | with: 9 | version: "1.42.0" 10 | - name: dhall freeze 11 | run: dhall freeze --all ./package.dhall 12 | 13 | name: Test 14 | on: 15 | push: {} 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.cache 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Filipe Regadas 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | 2 | PKGS=$(wildcard *.dhall) 3 | EXAMPLES=$(wildcard examples/*.dhall) 4 | FREEZE=$(PKGS:%.dhall=%.dhall.freezed) 5 | FREEZE_EXAMPLES=$(EXAMPLES:%.dhall=%.dhall.freezed) 6 | YAML_EXAMPLES=$(EXAMPLES:examples/%.dhall=examples/out/%.yaml) 7 | 8 | all: freeze examples 9 | 10 | examples/out/%.yaml: examples/%.dhall 11 | mkdir -p .cache 12 | sed 's#https://regadas.dev.*package.dhall.*#./package.dhall#' $< | \ 13 | env XDG_CACHE_HOME=.cache dhall-to-yaml --output $@ 14 | 15 | examples: $(YAML_EXAMPLES) 16 | 17 | %.dhall.freezed: %.dhall 18 | dhall freeze --all $< 19 | 20 | freeze: $(FREEZE) $(FREEZE_EXAMPLES) 21 | 22 | clean: $(YAML_EXAMPLES) 23 | rm -Rf $^ .cache 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # github-actions-dhall 2 | 3 | Typecheck, template and modularize your Github Action definitions with [Dhall](https://github.com/dhall-lang). 4 | 5 | ## Usage 6 | 7 | Import the `github actions` definitions as a `Dhall` package using: 8 | 9 | ```js 10 | let GithubActions = 11 | https://regadas.dev/github-actions-dhall/package.dhall 12 | ``` 13 | 14 | [Workflow](types/Workflow.dhall) definition can be done by using the schema pattern and setting the appropriate values. 15 | 16 | ## Examples 17 | 18 | - [hello-world.dhall](examples/hello-world.dhall) 19 | 20 | ```bash 21 | curl https://regadas.dev/github-actions-dhall/examples/hello-world.dhall | dhall-to-yaml 22 | ``` 23 | 24 | - [scala.dhall](examples/scala.dhall) 25 | 26 | ```bash 27 | curl https://regadas.dev/github-actions-dhall/examples/scala.dhall | dhall-to-yaml 28 | ``` 29 | 30 | - [release-scala.dhall](examples/release-scala.dhall) 31 | 32 | ```bash 33 | curl https://regadas.dev/github-actions-dhall/examples/release-scala.dhall | dhall-to-yaml 34 | ``` 35 | -------------------------------------------------------------------------------- /defaults.dhall: -------------------------------------------------------------------------------- 1 | { Job = 2 | ./defaults/Job.dhall 3 | sha256:0b6c2901d8f26ad1ca0df889ac09eb55534473c92166097a5e8b717b90358cc8 4 | , On = 5 | ./defaults/On.dhall 6 | sha256:863bd06803849476a3c097ea67465867c2ca232bbe8f8250fb151278d2e3cebd 7 | , Step = 8 | ./defaults/Step.dhall 9 | sha256:fc31ac861cbf0231429dc5d94bf8a1f905fcdf6ec108e376c5c82b60d9ddf5c0 10 | , Service = 11 | ./defaults/Service.dhall 12 | sha256:df4da0625e279bfe7965136bc8f19c469205929070ffcfc23155c0f667b5bf5d 13 | , Workflow = 14 | ./defaults/Workflow.dhall 15 | sha256:7581b7a9a9ad5cee65ddb349a9334a90932a5a8c02b5b6738ba20bcefc279f71 16 | , Push = 17 | ./defaults/events/Push.dhall 18 | sha256:429ab447921ab87a92a45f8e3078a19f0efeef58e859f4648af9c4a2c2976180 19 | , PullRequest = 20 | ./defaults/events/PullRequest.dhall 21 | sha256:9e2fc019f7ce975624fd1f0b643d7356fcd4626ea3af911b21e9d046cf2c0d16 22 | , PullRequestReview = 23 | ./defaults/events/PullRequestReview.dhall 24 | sha256:9adb6b3b154d4f1df647c43579e37be36ac9bbb7848cdba159863220ec52bb9f 25 | , Delete = 26 | ./defaults/events/Delete.dhall 27 | sha256:9bb9dcb5bf6f795291686f59383bcd01c8e79b87fc3fb63351d46dea100ac51b 28 | , Schedule = 29 | ./defaults/events/Schedule.dhall 30 | sha256:9bb9dcb5bf6f795291686f59383bcd01c8e79b87fc3fb63351d46dea100ac51b 31 | , Input = 32 | ./defaults/Input.dhall 33 | sha256:df12c8ed01a5352e459a85682b0f85dbf87c9b77536c91ac351dc4c2b53b6fca 34 | , Output = 35 | ./defaults/Output.dhall 36 | sha256:15e5b80617e8fe293b16c2698712ac767dc1690ff74f28b174539cc664caa3dd 37 | , Secret = 38 | ./defaults/Secret.dhall 39 | sha256:a810bcbb4fa7a5bca45fcc87a896cde15bf619256f7de3eed52a95ec48ffa04e 40 | , RepositoryDispatch = 41 | ./defaults/events/RepositoryDispatch.dhall 42 | sha256:9adb6b3b154d4f1df647c43579e37be36ac9bbb7848cdba159863220ec52bb9f 43 | , WorkflowCall = 44 | ./defaults/events/WorkflowCall.dhall 45 | sha256:3915943138e887c98ee7a05bd19461dc22ca892614f14e4fbac7c7ba8c8eb97e 46 | , WorkflowDispatch = 47 | ./defaults/events/WorkflowDispatch.dhall 48 | sha256:a716e8cb55dc8f5eb7ac0ad7dd5001c8294f18af73027fcc32668793be084d29 49 | , WorkflowRun = 50 | ./defaults/events/WorkflowRun.dhall 51 | sha256:1c1282b9bd39e056cf38d17a3f5e235e80af8cd98f9163addd508d0a792a6c51 52 | , Release = 53 | ./defaults/events/Release.dhall 54 | sha256:08967ae33ec89511f588be7a92274edf9c752801f38ba9c7122f8e684cfcea18 55 | , actions/HaskellSetup = 56 | ./defaults/actions/HaskellSetup.dhall 57 | sha256:e0762bf1442388cce1187fbac3e606685337f45b0e69251cfa33e513dc03c709 58 | , MergeGroup = 59 | ./defaults/events/MergeGroup.dhall 60 | sha256:61de39fb02b49bb17e966f3d22d769599874c1f98321b3accaffcbe3b9025b2b 61 | } 62 | -------------------------------------------------------------------------------- /defaults/Concurrency.dhall: -------------------------------------------------------------------------------- 1 | { group = None, cancel-in-progress = False } 2 | -------------------------------------------------------------------------------- /defaults/Container.dhall: -------------------------------------------------------------------------------- 1 | { options = None Text } 2 | -------------------------------------------------------------------------------- /defaults/Env.dhall: -------------------------------------------------------------------------------- 1 | None 2 | ../types/Env.dhall sha256:e73a2ec07449acffe1a4ba9cd261b845a8beb8f81fbc1415575639e99da668e6 3 | -------------------------------------------------------------------------------- /defaults/Input.dhall: -------------------------------------------------------------------------------- 1 | { description = None Text, default = None Text, required = False, type = None ../types/InputType.dhall } 2 | -------------------------------------------------------------------------------- /defaults/Job.dhall: -------------------------------------------------------------------------------- 1 | let Concurrency = ../types/Concurrency.dhall 2 | 3 | let Container = ../types/Container.dhall 4 | 5 | let Defaults = ../types/Defaults.dhall 6 | 7 | let Env = ../types/Env.dhall 8 | 9 | let JobEnv = ../types/JobEnv.dhall 10 | 11 | let Service = ../types/Service.dhall 12 | 13 | let Strategy = ../types/Strategy.dhall 14 | 15 | let Permission = ../types/Permission.dhall 16 | 17 | let PermissionAccess = ../types/PermissionAccess.dhall 18 | 19 | let ContinueOnError = ../types/ContinueOnError.dhall 20 | 21 | in { name = None Text 22 | , needs = None (List Text) 23 | , continue-on-error = None ContinueOnError 24 | , strategy = None Strategy 25 | , environment = None JobEnv 26 | , outputs = None (List { mapKey : Text, mapValue : Text }) 27 | , env = None Env 28 | , defaults = None Defaults 29 | , timeout-minutes = None Natural 30 | , `if` = None Text 31 | , services = None (List { mapKey : Text, mapValue : Service }) 32 | , container = None Container 33 | , concurrency = None Concurrency 34 | , permissions = 35 | None (List { mapKey : Permission, mapValue : PermissionAccess }) 36 | , secrets = None (List { mapKey : Text, mapValue : Text }) 37 | } 38 | -------------------------------------------------------------------------------- /defaults/JobEnv.dhall: -------------------------------------------------------------------------------- 1 | { url = None Text } 2 | -------------------------------------------------------------------------------- /defaults/On.dhall: -------------------------------------------------------------------------------- 1 | let Push = ../types/events/Push.dhall 2 | 3 | let PullRequest = ../types/events/PullRequest.dhall 4 | 5 | let PullRequestReview = ../types/events/PullRequestReview.dhall 6 | 7 | let Delete = ../types/events/Delete.dhall 8 | 9 | let Schedule = ../types/events/Schedule.dhall 10 | 11 | let RepositoryDispatch = ../types/events/RepositoryDispatch.dhall 12 | 13 | let WorkflowCall = ../types/events/WorkflowCall.dhall 14 | 15 | let WorkflowDispatch = ../types/events/WorkflowDispatch.dhall 16 | 17 | let WorkflowRun = ../types/events/WorkflowRun.dhall 18 | 19 | let Release = ../types/events/Release.dhall 20 | 21 | let MergeGroup = ../types/events/MergeGroup.dhall 22 | 23 | let PullRequestTarget = ../types/events/PullRequestTarget.dhall 24 | 25 | in { push = None Push 26 | , pull_request = None PullRequest 27 | , pull_request_review = None PullRequestReview 28 | , pull_request_target = None PullRequestTarget 29 | , delete = None Delete 30 | , schedule = None (List Schedule) 31 | , repository_dispatch = None RepositoryDispatch 32 | , workflow_call = None WorkflowCall 33 | , workflow_dispatch = None WorkflowDispatch 34 | , workflow_run = None WorkflowRun 35 | , release = None Release 36 | , merge_group = None MergeGroup 37 | } 38 | -------------------------------------------------------------------------------- /defaults/Output.dhall: -------------------------------------------------------------------------------- 1 | { description = None Text, value = "" } 2 | -------------------------------------------------------------------------------- /defaults/Secret.dhall: -------------------------------------------------------------------------------- 1 | { description = None Text, required = False } 2 | -------------------------------------------------------------------------------- /defaults/Service.dhall: -------------------------------------------------------------------------------- 1 | let Credentials = ../types/Credentials.dhall 2 | 3 | let Env = ../types/Env.dhall 4 | 5 | in { credentials = None Credentials 6 | , env = None Env 7 | , ports = None (List Text) 8 | , volumes = None (List Text) 9 | , options = None Text 10 | } 11 | -------------------------------------------------------------------------------- /defaults/Step.dhall: -------------------------------------------------------------------------------- 1 | let Strategy = ../types/Strategy.dhall 2 | 3 | let Env = ../types/Env.dhall 4 | 5 | in { env = None Env 6 | , id = None Text 7 | , name = None Text 8 | , shell = None Text 9 | , run = None Text 10 | , uses = None Text 11 | , continue-on-error = None Bool 12 | , `with` = None (List { mapKey : Text, mapValue : Text }) 13 | , strategy = None Strategy 14 | , `if` = None Text 15 | , working-directory = None Text 16 | , timeout-minutes = None Natural 17 | } 18 | -------------------------------------------------------------------------------- /defaults/Strategy.dhall: -------------------------------------------------------------------------------- 1 | { fail-fast = None Bool, max-parallel = None Natural } 2 | -------------------------------------------------------------------------------- /defaults/Workflow.dhall: -------------------------------------------------------------------------------- 1 | let Env = ../types/Env.dhall 2 | 3 | let Defaults = ../types/Defaults.dhall 4 | 5 | let Concurrency = ../types/Concurrency.dhall 6 | 7 | let Permission = ../types/Permission.dhall 8 | 9 | let PermissionAccess = ../types/PermissionAccess.dhall 10 | 11 | in { env = None Env 12 | , defaults = None Defaults 13 | , concurrency = None Concurrency 14 | , permissions = 15 | None (List { mapKey : Permission, mapValue : PermissionAccess }) 16 | } 17 | -------------------------------------------------------------------------------- /defaults/actions/Checkout.dhall: -------------------------------------------------------------------------------- 1 | { repository = None Text 2 | , ref = None Text 3 | , token = None Text 4 | , ssh-key = None Text 5 | , ssh-known-hosts = None Text 6 | , ssh-strict = None Bool 7 | , ssh-user = None Text 8 | , persist-credentials = None Bool 9 | , path = None Text 10 | , clean = None Bool 11 | , filter = None Text 12 | , sparse-checkout = None Text 13 | , sparse-checkout-cone-mode = None Bool 14 | , fetch-depth = None Natural 15 | , fetch-tags = None Bool 16 | , show-progress = None Bool 17 | , lfs = None Bool 18 | , submodules = None Text 19 | , set-safe-directory = None Bool 20 | , github-server-url = None Text 21 | } -------------------------------------------------------------------------------- /defaults/actions/HaskellSetup.dhall: -------------------------------------------------------------------------------- 1 | { ghc-version = None Text 2 | , cabal-version = None Text 3 | , stack-version = None Text 4 | , enable-stack = None Bool 5 | , stack-no-global = None Bool 6 | , stack-setup-ghc = None Bool 7 | , disable-matcher = None Bool 8 | } 9 | -------------------------------------------------------------------------------- /defaults/events/Delete.dhall: -------------------------------------------------------------------------------- 1 | {=} 2 | -------------------------------------------------------------------------------- /defaults/events/MergeGroup.dhall: -------------------------------------------------------------------------------- 1 | { types = None (List ../../types/events/merge_group/types.dhall) } 2 | -------------------------------------------------------------------------------- /defaults/events/PullRequest.dhall: -------------------------------------------------------------------------------- 1 | { branches = None (List Text) 2 | , branches-ignore = None (List Text) 3 | , tags = None (List Text) 4 | , paths = None (List Text) 5 | , paths-ignore = None (List Text) 6 | , types = None (List Text) 7 | } 8 | -------------------------------------------------------------------------------- /defaults/events/PullRequestReview.dhall: -------------------------------------------------------------------------------- 1 | { types = None (List Text) } 2 | -------------------------------------------------------------------------------- /defaults/events/PullRequestTarget.dhall: -------------------------------------------------------------------------------- 1 | { types = None ../../types/events/pull_request_target/types.dhall 2 | , branches = None (List Text) 3 | , branches-ignore = None (List Text) 4 | , paths = None (List Text) 5 | , paths-ignore = None (List Text) 6 | } 7 | -------------------------------------------------------------------------------- /defaults/events/Push.dhall: -------------------------------------------------------------------------------- 1 | { branches = None (List Text) 2 | , branches-ignore = None (List Text) 3 | , tags = None (List Text) 4 | , paths = None (List Text) 5 | , paths-ignore = None (List Text) 6 | } 7 | -------------------------------------------------------------------------------- /defaults/events/Release.dhall: -------------------------------------------------------------------------------- 1 | { types = None (List ../../types/events/release/types.dhall) } 2 | -------------------------------------------------------------------------------- /defaults/events/RepositoryDispatch.dhall: -------------------------------------------------------------------------------- 1 | { types = None (List Text) 2 | } 3 | -------------------------------------------------------------------------------- /defaults/events/Schedule.dhall: -------------------------------------------------------------------------------- 1 | {=} 2 | -------------------------------------------------------------------------------- /defaults/events/WorkflowCall.dhall: -------------------------------------------------------------------------------- 1 | { inputs = None (List { mapKey : Text, mapValue : ../../types/Input.dhall }) 2 | , outputs = None (List { mapKey : Text, mapValue : ../../types/Output.dhall }) 3 | , secrets = None (List { mapKey : Text, mapValue : ../../types/Secret.dhall }) 4 | } 5 | -------------------------------------------------------------------------------- /defaults/events/WorkflowDispatch.dhall: -------------------------------------------------------------------------------- 1 | { inputs = None (List { mapKey : Text, mapValue : ../../types/Input.dhall }) } 2 | -------------------------------------------------------------------------------- /defaults/events/WorkflowRun.dhall: -------------------------------------------------------------------------------- 1 | { types = None (List Text), branches = None (List Text) } 2 | -------------------------------------------------------------------------------- /examples/checkout-complex.dhall: -------------------------------------------------------------------------------- 1 | let GithubActions = 2 | https://regadas.dev/github-actions-dhall/package.dhall 3 | sha256:56b2d746cf5bf75b66276f5adaa057201bbe1ebf29836f4e35390e2a2bb68965 4 | 5 | let checkoutMain = 6 | GithubActions.steps.actions/checkout 7 | GithubActions.actions/checkout::{ 8 | , ref = Some "main" 9 | , fetch-depth = Some 0 10 | } 11 | 12 | let checkoutPrivateRepo = 13 | GithubActions.steps.actions/checkout 14 | GithubActions.actions/checkout::{ 15 | , repository = Some "myorg/private-repo" 16 | , path = Some "./private-repo" 17 | , token = Some "\${{ secrets.PAT_TOKEN }}" 18 | , sparse-checkout = Some 19 | '' 20 | src/ 21 | docs/ 22 | tests/ 23 | '' 24 | , sparse-checkout-cone-mode = Some True 25 | } 26 | 27 | let checkoutWithSubmodules = 28 | GithubActions.steps.actions/checkout 29 | GithubActions.actions/checkout::{ 30 | , submodules = Some "recursive" 31 | , fetch-depth = Some 1 32 | , lfs = Some True 33 | } 34 | 35 | in GithubActions.Workflow::{ 36 | , name = "Complex Checkout Example" 37 | , on = GithubActions.On::{ 38 | , push = Some GithubActions.Push::{ 39 | , branches = Some [ "main", "develop" ] 40 | , paths-ignore = Some [ "docs/**" ] 41 | } 42 | } 43 | , jobs = toMap 44 | { checkout-examples = GithubActions.Job::{ 45 | , name = Some "Checkout Examples" 46 | , runs-on = GithubActions.types.RunsOn.ubuntu-latest 47 | , steps = 48 | [ checkoutMain, checkoutPrivateRepo, checkoutWithSubmodules ] 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /examples/hello-world.dhall: -------------------------------------------------------------------------------- 1 | let GithubActions = 2 | https://regadas.dev/github-actions-dhall/package.dhall 3 | sha256:56b2d746cf5bf75b66276f5adaa057201bbe1ebf29836f4e35390e2a2bb68965 4 | 5 | let helloWorld = 6 | GithubActions.steps.actions/helloWorld 7 | { name = "Hello World", who-to-greet = "Mona the Octocat" } 8 | 9 | let echo = 10 | GithubActions.steps.echo 11 | { name = "Echo the greeting's time" 12 | , what = "'The time was \${{ steps.hello.outputs.time }}.'" 13 | } 14 | 15 | in GithubActions.Workflow::{ 16 | , name = "Greeting" 17 | , on = GithubActions.On::{ push = Some GithubActions.Push::{=} } 18 | , jobs = toMap 19 | { build = GithubActions.Job::{ 20 | , name = Some "Greeting" 21 | , runs-on = GithubActions.RunsOn.Type.ubuntu-latest 22 | , steps = [ helloWorld, echo ] 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /examples/out/checkout-complex.yaml: -------------------------------------------------------------------------------- 1 | jobs: 2 | checkout-examples: 3 | name: Checkout Examples 4 | runs-on: ubuntu-latest 5 | steps: 6 | - uses: "actions/checkout@v4" 7 | with: 8 | fetch-depth: '0' 9 | ref: main 10 | - uses: "actions/checkout@v4" 11 | with: 12 | path: "./private-repo" 13 | repository: myorg/private-repo 14 | sparse-checkout: | 15 | src/ 16 | docs/ 17 | tests/ 18 | sparse-checkout-cone-mode: 'true' 19 | token: "${{ secrets.PAT_TOKEN }}" 20 | - uses: "actions/checkout@v4" 21 | with: 22 | fetch-depth: '1' 23 | lfs: 'true' 24 | submodules: recursive 25 | name: Complex Checkout Example 26 | on: 27 | push: 28 | branches: 29 | - main 30 | - develop 31 | paths-ignore: 32 | - "docs/**" 33 | -------------------------------------------------------------------------------- /examples/out/hello-world.yaml: -------------------------------------------------------------------------------- 1 | jobs: 2 | build: 3 | name: Greeting 4 | runs-on: ubuntu-latest 5 | steps: 6 | - name: Hello World 7 | uses: "actions/hello-world-javascript-action@v1" 8 | with: 9 | who-to-greet: Mona the Octocat 10 | - name: "Echo the greeting's time" 11 | run: "echo 'The time was ${{ steps.hello.outputs.time }}.'" 12 | name: Greeting 13 | on: 14 | push: {} 15 | -------------------------------------------------------------------------------- /examples/out/release-scala.yaml: -------------------------------------------------------------------------------- 1 | jobs: 2 | build: 3 | environment: 4 | name: production 5 | url: https://github.com 6 | name: Publish 7 | permissions: 8 | id-token: read 9 | runs-on: ubuntu-18.04 10 | steps: 11 | - uses: "actions/checkout@v2" 12 | - name: java 11 setup 13 | uses: "olafurpg/setup-java@v6" 14 | with: 15 | java-version: '11' 16 | - uses: "olafurpg/setup-gpg@v2" 17 | - env: 18 | PGP_PASSPHRASE: "${{ secrets.PGP_PASSPHRASE }}" 19 | PGP_SECRET: "${{ secrets.PGP_SECRET }}" 20 | SONATYPE_PASSWORD: "${{ secrets.SONATYPE_PASSWORD }}" 21 | SONATYPE_USERNAME: "${{ secrets.SONATYPE_USERNAME }}" 22 | name: "Publish ${{ github.ref }}" 23 | run: sbt ci-release 24 | name: Release 25 | on: 26 | push: 27 | branches: 28 | - master 29 | tags: 30 | - "*" 31 | -------------------------------------------------------------------------------- /examples/out/scala.yaml: -------------------------------------------------------------------------------- 1 | jobs: 2 | build: 3 | name: Build 4 | needs: 5 | - checks 6 | runs-on: ubuntu-latest 7 | steps: 8 | - uses: "actions/checkout@v2" 9 | - name: "~/.sbt\n\"~/.cache/coursier\"\n cache" 10 | uses: "actions/cache@v4" 11 | with: 12 | key: "${{ runner.os }}-sbt-${{ hashFiles('build.sbt', 'project/plugins.sbt', 'project/build.properties', 'project/Dependencies.scala') }}" 13 | path: | 14 | ~/.sbt 15 | "~/.cache/coursier" 16 | restore-keys: | 17 | ${{ runner.os }}-sbt 18 | - name: "java ${{ matrix.scala}} setup" 19 | uses: "actions/setup-java@v1.4.3" 20 | with: 21 | architecture: x64 22 | java-package: jdk 23 | java-version: "${{ matrix.scala}}" 24 | - run: "sbt \"++${{ matrix.scala}} test\"" 25 | strategy: 26 | matrix: 27 | java: 28 | - '8.0.232' 29 | - '11.0.5' 30 | scala: 31 | - '2.11.12' 32 | - '2.12.11' 33 | checks: 34 | name: Checks 35 | runs-on: ubuntu-latest 36 | steps: 37 | - uses: "actions/checkout@v2" 38 | - name: "~/.sbt\n\"~/.cache/coursier\"\n cache" 39 | uses: "actions/cache@v4" 40 | with: 41 | key: "${{ runner.os }}-sbt-${{ hashFiles('build.sbt', 'project/plugins.sbt', 'project/build.properties', 'project/Dependencies.scala') }}" 42 | path: | 43 | ~/.sbt 44 | "~/.cache/coursier" 45 | restore-keys: | 46 | ${{ runner.os }}-sbt 47 | - name: java 11 setup 48 | uses: "actions/setup-java@v1.4.3" 49 | with: 50 | architecture: x64 51 | java-package: jdk 52 | java-version: '11' 53 | - run: sbt scalafmtCheckAll scalafmtSbtCheck 54 | name: Greeting 55 | on: 56 | pull_request: {} 57 | push: {} 58 | -------------------------------------------------------------------------------- /examples/release-scala.dhall: -------------------------------------------------------------------------------- 1 | let GithubActions = 2 | https://regadas.dev/github-actions-dhall/package.dhall 3 | sha256:56b2d746cf5bf75b66276f5adaa057201bbe1ebf29836f4e35390e2a2bb68965 4 | 5 | let setup = 6 | [ GithubActions.steps.actions/checkout 7 | , GithubActions.steps.olafurpg/setup-java { java-version = "11" } 8 | , GithubActions.steps.olafurpg/setup-gpg 9 | , GithubActions.steps.olafurpg/sbt-ci-release 10 | ] 11 | 12 | in GithubActions.Workflow::{ 13 | , name = "Release" 14 | , on = GithubActions.On::{ 15 | , push = Some GithubActions.Push::{ 16 | , branches = Some [ "master" ] 17 | , tags = Some [ "*" ] 18 | } 19 | } 20 | , jobs = toMap 21 | { build = GithubActions.Job::{ 22 | , name = Some "Publish" 23 | , environment = Some GithubActions.JobEnv::{ 24 | , name = "production" 25 | , url = Some "https://github.com" 26 | } 27 | , permissions = Some 28 | [ { mapKey = GithubActions.types.Permission.id-token 29 | , mapValue = GithubActions.types.PermissionAccess.read 30 | } 31 | ] 32 | , runs-on = GithubActions.types.RunsOn.`ubuntu-18.04` 33 | , steps = setup 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /examples/scala.dhall: -------------------------------------------------------------------------------- 1 | let GithubActions = 2 | https://regadas.dev/github-actions-dhall/package.dhall 3 | sha256:56b2d746cf5bf75b66276f5adaa057201bbe1ebf29836f4e35390e2a2bb68965 4 | 5 | let matrix = 6 | toMap { java = [ "8.0.232", "11.0.5" ], scala = [ "2.11.12", "2.12.11" ] } 7 | 8 | let setup = 9 | [ GithubActions.steps.actions/checkout 10 | , GithubActions.steps.actions/cache 11 | { path = 12 | '' 13 | ~/.sbt 14 | "~/.cache/coursier" 15 | '' 16 | , key = "sbt" 17 | , hashFiles = 18 | [ "build.sbt" 19 | , "project/plugins.sbt" 20 | , "project/build.properties" 21 | , "project/Dependencies.scala" 22 | ] 23 | } 24 | ] 25 | 26 | in GithubActions.Workflow::{ 27 | , name = "Greeting" 28 | , on = GithubActions.On::{ 29 | , push = Some GithubActions.Push::{=} 30 | , pull_request = Some GithubActions.PullRequest::{=} 31 | } 32 | , jobs = toMap 33 | { checks = GithubActions.Job::{ 34 | , name = Some "Checks" 35 | , runs-on = GithubActions.types.RunsOn.ubuntu-latest 36 | , steps = 37 | setup 38 | # [ GithubActions.steps.actions/setup-java { java-version = "11" } 39 | , GithubActions.steps.run 40 | { run = "sbt scalafmtCheckAll scalafmtSbtCheck" } 41 | ] 42 | } 43 | , build = GithubActions.Job::{ 44 | , name = Some "Build" 45 | , needs = Some [ "checks" ] 46 | , strategy = Some GithubActions.Strategy::{ matrix } 47 | , runs-on = GithubActions.types.RunsOn.ubuntu-latest 48 | , steps = 49 | setup 50 | # [ GithubActions.steps.actions/setup-java 51 | { java-version = "\${{ matrix.scala}}" } 52 | , GithubActions.steps.run 53 | { run = "sbt \"++\${{ matrix.scala}} test\"" } 54 | ] 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /package.dhall: -------------------------------------------------------------------------------- 1 | ./schemas.dhall 2 | sha256:20cd8ee44018603eb18f170fe3caac5b6efd8428f6e1c7d7452ed37f74af4dde 3 | /\ { steps = 4 | ./steps.dhall 5 | sha256:1660cee900cb215a9e23b2c03653756f3d5edc6ac3c9842d38dd7d540092fdb8 6 | } 7 | /\ { types = 8 | ./types.dhall 9 | sha256:ebba2dadbc053d7fa6227426c0eb61505e1be1a8d9cc0de47b9cbcae9600c4f0 10 | } 11 | -------------------------------------------------------------------------------- /schemas.dhall: -------------------------------------------------------------------------------- 1 | { Job = 2 | ./schemas/Job.dhall 3 | sha256:2610292fbd89a567160f94d612761394e7cf5ab527b89cfa1f9de41a6a9af1fc 4 | , JobEnv = 5 | ./schemas/JobEnv.dhall 6 | sha256:9ccec904643ade1050323d9ce5da865a3ad8c764a7cbc0f3c397717b1a0ece74 7 | , On = 8 | ./schemas/On.dhall 9 | sha256:d603159cb9fee79b830cb1c1bb58fb247a1984795a4a01a1ee26baa8dc531e8a 10 | , RunsOn = 11 | ./schemas/RunsOn.dhall 12 | sha256:8bdd3fbcd62c0e10dbd78a71ca155c712df5687f2e93713c7e6248ffe9739f6d 13 | , Step = 14 | ./schemas/Step.dhall 15 | sha256:7e0c2877e2ee3d57de46c1bf631d36f3d0ff636f73514233dbed3f100d2530ce 16 | , Strategy = 17 | ./schemas/Strategy.dhall 18 | sha256:7161390c7ecb252191f9f1aba39ad2e1ae24773f4a2c1b3a1224e95bc5dd1db9 19 | , Service = 20 | ./schemas/Service.dhall 21 | sha256:ccf7857f3b39aba24ae09b6eb2b430c96be6b3bc697ed6f0bae464e1e7bdff82 22 | , Workflow = 23 | ./schemas/Workflow.dhall 24 | sha256:7b9fde125f72f9db6fdd98399ff4e8431376861a33bb3c203e5b33da0f48fd22 25 | , Push = 26 | ./schemas/events/Push.dhall 27 | sha256:42b2efddec698fbb36321e738286478b35dfd9420ce10798659237570db55024 28 | , PullRequest = 29 | ./schemas/events/PullRequest.dhall 30 | sha256:35c325a81978da6982f1eb67605366b0a18510c142b7f425c38ce9c805e935ef 31 | , PullRequestReview = 32 | ./schemas/events/PullRequestReview.dhall 33 | sha256:53256e908fe5eb196af560db2c337b6cbc35c2eee48d6d459714554c8f777c9d 34 | , PullRequestTarget = 35 | ./schemas/events/PullRequestTarget.dhall 36 | sha256:b0f7415f9183618c3cd3f5bb8acec121829b61a95d5b08d828228657f968b2b1 37 | , Delete = 38 | ./schemas/events/Delete.dhall 39 | sha256:81a1bf11fb9dc588941bd83400ed571298585a700a53e858456806f7ea3b8ce2 40 | , Schedule = 41 | ./schemas/events/Schedule.dhall 42 | sha256:03caaa6deeed4018094f9a77b2db6f49c28ca75874c44e2256e8147894c30746 43 | , Input = 44 | ./schemas/Input.dhall 45 | sha256:e7d67b6e4cc8f4f306cbcf63726aaa98857e5f82b1f5144c9bc20e6792d4c327 46 | , InputType = 47 | ./schemas/InputType.dhall 48 | sha256:1a3f2617073a99318a669399297294488d9a6a69100ca9607c44609a9a62343e 49 | , Output = 50 | ./schemas/Output.dhall 51 | sha256:f01b31455186c9ecf937b48023d9408a7d5bf5db3fc4964b6060a43e1c4dabe8 52 | , Secret = 53 | ./schemas/Secret.dhall 54 | sha256:a58fd6ad314edcd6800e283206de83e76cb0b3d56998570b1f5482a2d8f4a56f 55 | , RepositoryDispatch = 56 | ./schemas/events/RepositoryDispatch.dhall 57 | sha256:53256e908fe5eb196af560db2c337b6cbc35c2eee48d6d459714554c8f777c9d 58 | , WorkflowCall = 59 | ./schemas/events/WorkflowCall.dhall 60 | sha256:0d426c3ad8d247dff28e40f2582da1a84b524e9d30d846cc4b29a8d506f4a800 61 | , WorkflowDispatch = 62 | ./schemas/events/WorkflowDispatch.dhall 63 | sha256:46a12434dc48946da6d5debfb5806991198c3d091f80fd3e2690838380602712 64 | , WorkflowRun = 65 | ./schemas/events/WorkflowRun.dhall 66 | sha256:e9b84d6d0609aca151aa330fd150bc6a9fde057235dec7ca594d6369c9165bb1 67 | , Release = 68 | ./schemas/events/Release.dhall 69 | sha256:f6f1fbbad2844fb0496f9e7c2ad534474ca82d6b84db5e588f506d41eec10a01 70 | , actions/HaskellSetup = 71 | ./schemas/actions/HaskellSetup.dhall 72 | sha256:e6dbbacedf33965f5005dc2a22164d0a5edb3e09b2b4842104cec011c6d3c95d 73 | , actions/checkout = 74 | ./schemas/actions/Checkout.dhall 75 | sha256:d9c339bf138755db638c58f18d91dcd40a49f5905064af111b1b56d8eec57c5a 76 | , Concurrency = 77 | ./schemas/Concurrency.dhall 78 | sha256:2ed562a8c402ad394223c57857e52915ab16b94775dfc0f4d277f227b6c6d450 79 | , Container = 80 | ./schemas/Container.dhall 81 | sha256:7eee1486550d25ac8de00cb12cfdb1cba0e1a1360f04c52fdf092b31411131e6 82 | , MergeGroup = 83 | ./schemas/events/MergeGroup.dhall 84 | sha256:4a3e8748d9a20ab6beec8bd7dcca67b465e600563c5dbfca4cd3d464c9f69dcb 85 | } 86 | -------------------------------------------------------------------------------- /schemas/Concurrency.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../types/Concurrency.dhall, default = ../defaults/Concurrency.dhall } 2 | -------------------------------------------------------------------------------- /schemas/Container.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../types/Container.dhall, default = ../defaults/Container.dhall } 2 | -------------------------------------------------------------------------------- /schemas/Env.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../types/Env.dhall, default = ../defaults/Env.dhall } 2 | -------------------------------------------------------------------------------- /schemas/Input.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../types/Input.dhall, default = ../defaults/Input.dhall } 2 | -------------------------------------------------------------------------------- /schemas/InputType.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../types/InputType.dhall } 2 | -------------------------------------------------------------------------------- /schemas/Job.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../types/Job.dhall, default = ../defaults/Job.dhall } 2 | -------------------------------------------------------------------------------- /schemas/JobEnv.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../types/JobEnv.dhall, default = ../defaults/JobEnv.dhall } 2 | -------------------------------------------------------------------------------- /schemas/On.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../types/On.dhall, default = ../defaults/On.dhall } 2 | -------------------------------------------------------------------------------- /schemas/Output.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../types/Output.dhall, default = ../defaults/Output.dhall } 2 | -------------------------------------------------------------------------------- /schemas/RunsOn.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../types/RunsOn.dhall } 2 | -------------------------------------------------------------------------------- /schemas/Secret.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../types/Secret.dhall, default = ../defaults/Secret.dhall } 2 | -------------------------------------------------------------------------------- /schemas/Service.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../types/Service.dhall, default = ../defaults/Service.dhall } 2 | -------------------------------------------------------------------------------- /schemas/Step.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../types/Step.dhall, default = ../defaults/Step.dhall } 2 | -------------------------------------------------------------------------------- /schemas/Strategy.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../types/Strategy.dhall, default = ../defaults/Strategy.dhall } 2 | -------------------------------------------------------------------------------- /schemas/Workflow.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../types/Workflow.dhall, default = ../defaults/Workflow.dhall } 2 | -------------------------------------------------------------------------------- /schemas/actions/Checkout.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../../types/actions/Checkout.dhall 2 | , default = ../../defaults/actions/Checkout.dhall 3 | } -------------------------------------------------------------------------------- /schemas/actions/HaskellSetup.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../../types/actions/HaskellSetup.dhall 2 | , default = ../../defaults/actions/HaskellSetup.dhall 3 | } 4 | -------------------------------------------------------------------------------- /schemas/events/Delete.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../../types/events/Delete.dhall 2 | , default = ../../defaults/events/Delete.dhall 3 | } 4 | -------------------------------------------------------------------------------- /schemas/events/MergeGroup.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../../types/events/MergeGroup.dhall 2 | , default = ../../defaults/events/MergeGroup.dhall 3 | } 4 | -------------------------------------------------------------------------------- /schemas/events/PullRequest.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../../types/events/PullRequest.dhall 2 | , default = ../../defaults/events/PullRequest.dhall 3 | } 4 | -------------------------------------------------------------------------------- /schemas/events/PullRequestReview.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../../types/events/PullRequestReview.dhall 2 | , default = ../../defaults/events/PullRequestReview.dhall 3 | } 4 | -------------------------------------------------------------------------------- /schemas/events/PullRequestTarget.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../../types/events/PullRequestTarget.dhall 2 | , default = ../../defaults/events/PullRequestTarget.dhall 3 | } 4 | -------------------------------------------------------------------------------- /schemas/events/Push.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../../types/events/Push.dhall 2 | , default = ../../defaults/events/Push.dhall 3 | } 4 | -------------------------------------------------------------------------------- /schemas/events/Release.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../../types/events/Release.dhall 2 | , default = ../../defaults/events/Release.dhall 3 | } 4 | -------------------------------------------------------------------------------- /schemas/events/RepositoryDispatch.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../../types/events/RepositoryDispatch.dhall 2 | , default = ../../defaults/events/RepositoryDispatch.dhall 3 | } 4 | -------------------------------------------------------------------------------- /schemas/events/Schedule.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../../types/events/Schedule.dhall 2 | , default = ../../defaults/events/Schedule.dhall 3 | } 4 | -------------------------------------------------------------------------------- /schemas/events/WorkflowCall.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../../types/events/WorkflowCall.dhall 2 | , default = ../../defaults/events/WorkflowCall.dhall 3 | } 4 | -------------------------------------------------------------------------------- /schemas/events/WorkflowDispatch.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../../types/events/WorkflowDispatch.dhall 2 | , default = ../../defaults/events/WorkflowDispatch.dhall 3 | } 4 | -------------------------------------------------------------------------------- /schemas/events/WorkflowRun.dhall: -------------------------------------------------------------------------------- 1 | { Type = ../../types/events/WorkflowRun.dhall 2 | , default = ../../defaults/events/WorkflowRun.dhall 3 | } 4 | -------------------------------------------------------------------------------- /steps.dhall: -------------------------------------------------------------------------------- 1 | { run = 2 | ./steps/run.dhall 3 | sha256:1ed6d8f02429df6620ffa02b3118aebb08f1473413ea1f8cea1fedddf23296fe 4 | , echo = 5 | ./steps/echo.dhall 6 | sha256:3606d47244c51259f4d1b4761cf55a38fca1f72de1bc06db55be0c38068e3f86 7 | , actions/checkout = 8 | ./steps/actions/checkout.dhall 9 | sha256:a65f084b2844dd128664a7705f98dac51670d1c869700f4eb6c8ee11d0b0d9a7 10 | , actions/cache = 11 | ./steps/actions/cache.dhall 12 | sha256:b6d6702a9faa91b3b64f9ac7e84b1f8706a460dd02fcf2e47cbbedb9053e6e96 13 | , actions/helloWorld = 14 | ./steps/actions/helloWorld.dhall 15 | sha256:69bc163d0b30165fb1792c23871a0ad6fade1095517f6b3fa3b834a615f3d2fc 16 | , actions/setup-haskell = 17 | ./steps/actions/setup-haskell.dhall 18 | sha256:64832d56eca122c4f5d1fc11dbe1e1a442b5a370b4aa415c96477d256f5ec2e0 19 | , actions/setup-java = 20 | ./steps/actions/setup-java.dhall 21 | sha256:2971bd13d0d93c5f1d7b1c215fa092ceb87c11ed9e37dc03de36587b1b5b2179 22 | , cachix/cachix = 23 | ./steps/cachix/cachix.dhall 24 | sha256:a3d2850422b4859788d50b826e87be42d04604b3644bc797537f8e6494038213 25 | , cachix/install-nix = 26 | ./steps/cachix/install-nix.dhall 27 | sha256:38a071cb582ba996144bc227a2cbfd83aebdd7ea23f7467567be11d5b2a737f2 28 | , elastic/elasticsearch = 29 | ./steps/elastic/elasticsearch.dhall 30 | sha256:0448933c1cf549cda85e1fad9393a3ddfd3c5836c3a2a542cb19e213eafb5b32 31 | , JamesIves/ghpages-deploy = 32 | ./steps/JamesIves/ghpages-deploy.dhall 33 | sha256:a058045ee65b3d264c5c5747f81091f5fc77ecf05b7dc7939d3ca2efa37c8151 34 | , olafurpg/sbt-ci-release = 35 | ./steps/olafurpg/sbt-ci-release.dhall 36 | sha256:43246791d7008b7d02f6767e155b3cca89c3ba0c3e6d9865c2554cf4e2d1ed38 37 | , olafurpg/setup-java = 38 | ./steps/olafurpg/setup-java.dhall 39 | sha256:05f40edbad1a9b3e4b2aed049c18ae0b9b40b678fa066af34a40f68f5685e4f0 40 | , olafurpg/setup-gpg = 41 | ./steps/olafurpg/setup-gpg.dhall 42 | sha256:c50355ce97b750ed213dfb4680e84d42639f022aa1c3c440fa2879337832264d 43 | } 44 | -------------------------------------------------------------------------------- /steps/JamesIves/AuthSchema.dhall: -------------------------------------------------------------------------------- 1 | < accessToken | githubToken | ssh > 2 | -------------------------------------------------------------------------------- /steps/JamesIves/Options.dhall: -------------------------------------------------------------------------------- 1 | Optional (List { mapKey : Text, mapValue : Text }) 2 | -------------------------------------------------------------------------------- /steps/JamesIves/ghpages-deploy.dhall: -------------------------------------------------------------------------------- 1 | let Step = ../../schemas/Step.dhall 2 | 3 | let AuthSchema = ./AuthSchema.dhall 4 | 5 | let Options = ./Options.dhall 6 | 7 | let auth = 8 | λ(authSchema : AuthSchema) → 9 | merge 10 | { accessToken = toMap 11 | { ACCESS_TOKEN = "\${{ secrets.ACCESS_TOKEN }}" } 12 | , githubToken = toMap 13 | { GITHUB_TOKEN = "\${{ secrets.GITHUB_TOKEN }}" } 14 | , ssh = toMap { SSH = "true" } 15 | } 16 | authSchema 17 | 18 | let R = List { mapKey : Text, mapValue : Text } 19 | 20 | let opts = 21 | λ(options : Options) → 22 | merge { None = [] : R, Some = λ(xs : R) → xs } options 23 | 24 | in λ ( args 25 | : { authSchema : AuthSchema 26 | , branch : Text 27 | , folder : Text 28 | , opts : Options 29 | } 30 | ) → 31 | Step::{ 32 | , id = None Text 33 | , name = Some "Deploy 🚀" 34 | , uses = Some "JamesIves/github-pages-deploy-action@3.5.3" 35 | , run = None Text 36 | , `with` = Some 37 | ( toMap { BRANCH = args.branch, FOLDER = args.folder } 38 | # auth args.authSchema 39 | # opts args.opts 40 | ) 41 | } 42 | -------------------------------------------------------------------------------- /steps/actions/cache.dhall: -------------------------------------------------------------------------------- 1 | let Step = ../../schemas/Step.dhall 2 | 3 | let Text/concatMapSep = 4 | https://prelude.dhall-lang.org/v17.1.0/Text/concatMapSep.dhall 5 | sha256:c272aca80a607bc5963d1fcb38819e7e0d3e72ac4d02b1183b1afb6a91340840 6 | 7 | let List/null = 8 | https://prelude.dhall-lang.org/v17.1.0/List/null.dhall 9 | sha256:2338e39637e9a50d66ae1482c0ed559bbcc11e9442bfca8f8c176bbcd9c4fc80 10 | 11 | in λ(args : { path : Text, key : Text, hashFiles : List Text }) → 12 | let keyComponent = "\${{ runner.os }}-${args.key}" 13 | 14 | let quote = λ(x : Text) → "'${x}'" 15 | 16 | let hashFilesArg = Text/concatMapSep ", " Text quote args.hashFiles 17 | 18 | let hashFilesComponent = 19 | if List/null Text args.hashFiles 20 | then "" 21 | else "-\${{ hashFiles(${hashFilesArg}) }}" 22 | 23 | in Step::{ 24 | , name = Some "${args.path} cache" 25 | , uses = Some "actions/cache@v4" 26 | , `with` = Some 27 | ( toMap 28 | { path = args.path 29 | , key = "${keyComponent}${hashFilesComponent}" 30 | , restore-keys = 31 | '' 32 | ${keyComponent} 33 | '' 34 | } 35 | ) 36 | } 37 | -------------------------------------------------------------------------------- /steps/actions/checkout.dhall: -------------------------------------------------------------------------------- 1 | let List/concatMap = 2 | https://prelude.dhall-lang.org/v17.1.0/List/concatMap.dhall 3 | sha256:3b2167061d11fda1e4f6de0522cbe83e0d5ac4ef5ddf6bb0b2064470c5d3fb64 4 | 5 | let Map = 6 | https://prelude.dhall-lang.org/v17.1.0/Map/package.dhall 7 | sha256:598e9c76103b2686fbbda6cc30078f9e60dd846d9eaf155d0149cf0ae06c21c5 8 | 9 | let Optional/map = 10 | https://prelude.dhall-lang.org/v17.1.0/Optional/map.dhall 11 | sha256:501534192d988218d43261c299cc1d1e0b13d25df388937add784778ab0054fa 12 | 13 | let Step = ../../schemas/Step.dhall 14 | 15 | let Checkout = ../../schemas/actions/Checkout.dhall 16 | 17 | let stringBool = 18 | Optional/map Bool Text (λ(b : Bool) → if b then "true" else "false") 19 | 20 | let stringNatural = 21 | Optional/map Natural Text (λ(n : Natural) → Natural/show n) 22 | 23 | let checkout 24 | : Checkout.Type → Step.Type 25 | = λ(args : Checkout.Type) → 26 | Step::{ 27 | , uses = Some "actions/checkout@v4" 28 | , `with` = Some 29 | ( List/concatMap 30 | (Map.Entry Text (Optional Text)) 31 | (Map.Entry Text Text) 32 | ( λ(e : Map.Entry Text (Optional Text)) → 33 | merge 34 | { None = [] : Map.Type Text Text 35 | , Some = λ(v : Text) → [ Map.keyText e.mapKey v ] 36 | } 37 | e.mapValue 38 | ) 39 | ( toMap 40 | { repository = args.repository 41 | , ref = args.ref 42 | , token = args.token 43 | , ssh-key = args.ssh-key 44 | , ssh-known-hosts = args.ssh-known-hosts 45 | , ssh-strict = stringBool args.ssh-strict 46 | , ssh-user = args.ssh-user 47 | , persist-credentials = stringBool args.persist-credentials 48 | , path = args.path 49 | , clean = stringBool args.clean 50 | , filter = args.filter 51 | , sparse-checkout = args.sparse-checkout 52 | , sparse-checkout-cone-mode = stringBool args.sparse-checkout-cone-mode 53 | , fetch-depth = stringNatural args.fetch-depth 54 | , fetch-tags = stringBool args.fetch-tags 55 | , show-progress = stringBool args.show-progress 56 | , lfs = stringBool args.lfs 57 | , submodules = args.submodules 58 | , set-safe-directory = stringBool args.set-safe-directory 59 | , github-server-url = args.github-server-url 60 | } 61 | ) 62 | ) 63 | } 64 | 65 | in checkout 66 | -------------------------------------------------------------------------------- /steps/actions/helloWorld.dhall: -------------------------------------------------------------------------------- 1 | let Step = ../../schemas/Step.dhall 2 | 3 | in λ(args : { name : Text, who-to-greet : Text }) → 4 | Step::{ 5 | , name = Some args.name 6 | , uses = Some "actions/hello-world-javascript-action@v1" 7 | , `with` = Some (toMap { who-to-greet = args.who-to-greet }) 8 | } 9 | -------------------------------------------------------------------------------- /steps/actions/setup-haskell.dhall: -------------------------------------------------------------------------------- 1 | let List/concatMap = 2 | https://prelude.dhall-lang.org/v17.1.0/List/concatMap.dhall 3 | sha256:3b2167061d11fda1e4f6de0522cbe83e0d5ac4ef5ddf6bb0b2064470c5d3fb64 4 | 5 | let Map = 6 | https://prelude.dhall-lang.org/v17.1.0/Map/package.dhall 7 | sha256:598e9c76103b2686fbbda6cc30078f9e60dd846d9eaf155d0149cf0ae06c21c5 8 | 9 | let Optional/map = 10 | https://prelude.dhall-lang.org/v17.1.0/Optional/map.dhall 11 | sha256:501534192d988218d43261c299cc1d1e0b13d25df388937add784778ab0054fa 12 | 13 | let Step = ../../schemas/Step.dhall 14 | 15 | let HaskellSetup = ../../schemas/actions/HaskellSetup.dhall 16 | 17 | let stringBool = 18 | Optional/map Bool Text (λ(b : Bool) → if b then "true" else "false") 19 | 20 | let haskell-setup 21 | : HaskellSetup.Type → Step.Type 22 | = λ(args : HaskellSetup.Type) → 23 | Step::{ 24 | , uses = Some "haskell/actions/setup@v1" 25 | , `with` = Some 26 | ( List/concatMap 27 | (Map.Entry Text (Optional Text)) 28 | (Map.Entry Text Text) 29 | ( λ(e : Map.Entry Text (Optional Text)) → 30 | merge 31 | { None = [] : Map.Type Text Text 32 | , Some = λ(v : Text) → [ Map.keyText e.mapKey v ] 33 | } 34 | e.mapValue 35 | ) 36 | ( toMap 37 | { ghc-version = args.ghc-version 38 | , cabal-version = args.cabal-version 39 | , stack-version = args.stack-version 40 | , enable-stack = stringBool args.enable-stack 41 | , stack-no-global = stringBool args.stack-no-global 42 | , stack-setup-ghc = stringBool args.stack-setup-ghc 43 | , disable-matcher = stringBool args.disable-matcher 44 | } 45 | ) 46 | ) 47 | } 48 | 49 | in haskell-setup 50 | -------------------------------------------------------------------------------- /steps/actions/setup-java.dhall: -------------------------------------------------------------------------------- 1 | let Step = ../../schemas/Step.dhall 2 | 3 | in λ(args : { java-version : Text }) → 4 | Step::{ 5 | , id = None Text 6 | , name = Some "java ${args.java-version} setup" 7 | , uses = Some "actions/setup-java@v1.4.3" 8 | , run = None Text 9 | , `with` = Some 10 | ( toMap 11 | { java-version = args.java-version 12 | , java-package = "jdk" 13 | , architecture = "x64" 14 | } 15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /steps/cachix/cachix.dhall: -------------------------------------------------------------------------------- 1 | let Step = ../../schemas/Step.dhall 2 | 3 | in λ(args : { cache-name : Text }) → 4 | Step::{ 5 | , id = None Text 6 | , name = None Text 7 | , uses = Some "cachix/cachix-action@v6" 8 | , run = None Text 9 | , `with` = Some 10 | ( toMap 11 | { name = args.cache-name 12 | , signingKey = "\${{ secrets.CACHIX_SIGNING_KEY }}" 13 | } 14 | ) 15 | } 16 | -------------------------------------------------------------------------------- /steps/cachix/install-nix.dhall: -------------------------------------------------------------------------------- 1 | let Step = ../../schemas/Step.dhall 2 | 3 | in Step::{ 4 | , id = None Text 5 | , name = None Text 6 | , uses = Some "cachix/install-nix-action@v9" 7 | , run = None Text 8 | , `with` = None (List { mapKey : Text, mapValue : Text }) 9 | } 10 | -------------------------------------------------------------------------------- /steps/echo.dhall: -------------------------------------------------------------------------------- 1 | let run = ./run.dhall 2 | 3 | in λ(args : { name : Text, what : Text }) → 4 | run { run = "echo ${args.what}" } 5 | ⫽ { id = None Text, name = Some args.name } 6 | -------------------------------------------------------------------------------- /steps/elastic/elasticsearch.dhall: -------------------------------------------------------------------------------- 1 | let Step = ../../schemas/Step.dhall 2 | 3 | in λ(args : { stack-version : Text, nodes : Optional Natural }) → 4 | let nodes-vars = 5 | merge 6 | { None = [] : List { mapKey : Text, mapValue : Text } 7 | , Some = λ(nodes : Natural) → toMap { nodes = Natural/show nodes } 8 | } 9 | args.nodes 10 | 11 | in Step::{ 12 | , id = None Text 13 | , name = Some "Runs elasticsearch version ${args.stack-version}" 14 | , uses = Some "elastic/elastic-github-actions/elasticsearch@master" 15 | , run = None Text 16 | , `with` = Some 17 | (toMap { stack-version = args.stack-version } # nodes-vars) 18 | } 19 | -------------------------------------------------------------------------------- /steps/olafurpg/sbt-ci-release.dhall: -------------------------------------------------------------------------------- 1 | let Step = ../../schemas/Step.dhall 2 | 3 | in Step::{ 4 | , id = None Text 5 | , name = Some "Publish \${{ github.ref }}" 6 | , uses = None Text 7 | , run = Some "sbt ci-release" 8 | , env = Some 9 | ( toMap 10 | { PGP_PASSPHRASE = "\${{ secrets.PGP_PASSPHRASE }}" 11 | , PGP_SECRET = "\${{ secrets.PGP_SECRET }}" 12 | , SONATYPE_PASSWORD = "\${{ secrets.SONATYPE_PASSWORD }}" 13 | , SONATYPE_USERNAME = "\${{ secrets.SONATYPE_USERNAME }}" 14 | } 15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /steps/olafurpg/setup-gpg.dhall: -------------------------------------------------------------------------------- 1 | let Step = ../../schemas/Step.dhall 2 | 3 | in Step::{ 4 | , id = None Text 5 | , name = None Text 6 | , uses = Some "olafurpg/setup-gpg@v2" 7 | , run = None Text 8 | , `with` = None (List { mapKey : Text, mapValue : Text }) 9 | } 10 | -------------------------------------------------------------------------------- /steps/olafurpg/setup-java.dhall: -------------------------------------------------------------------------------- 1 | let Step = ../../schemas/Step.dhall 2 | 3 | in λ(args : { java-version : Text }) → 4 | Step::{ 5 | , id = None Text 6 | , name = Some "java ${args.java-version} setup" 7 | , uses = Some "olafurpg/setup-java@v6" 8 | , run = None Text 9 | , `with` = Some (toMap { java-version = args.java-version }) 10 | } 11 | -------------------------------------------------------------------------------- /steps/run.dhall: -------------------------------------------------------------------------------- 1 | let Step = ../schemas/Step.dhall 2 | 3 | in λ(args : { run : Text }) → 4 | Step::{ 5 | , id = None Text 6 | , name = None Text 7 | , run = Some args.run 8 | , uses = None Text 9 | } 10 | -------------------------------------------------------------------------------- /types.dhall: -------------------------------------------------------------------------------- 1 | { Job = 2 | ./types/Job.dhall 3 | sha256:188b0ff021b3655e231fd815ec318f7c4bbb09c80e21476279500de49ab41945 4 | , JobEnv = 5 | ./types/JobEnv.dhall 6 | sha256:521e86d74ae30cec88804eb9fa8014510297c9cf6b4b412d1576df31ed72dc6f 7 | , Defaults = 8 | ./types/Defaults.dhall 9 | sha256:a2963761aaa06bae9abd5575667afbba6539d8ce694a4a82900bf4f9df2e7932 10 | , Strategy = 11 | ./types/Strategy.dhall 12 | sha256:060bf27380c527f136c2c86ba1cf1f7cab6ad3dd339e655db0873cc8068b7b9d 13 | , On = 14 | ./types/On.dhall 15 | sha256:72fbd13d4345c106ea4dcaea1e90886f87132165c9203ffcf4a230c216ddb754 16 | , Step = 17 | ./types/Step.dhall 18 | sha256:c2efe65fd3b819521612000af9ebee52e7a74cce4c37de891dcdc7d6c25169fa 19 | , RunsOn = 20 | ./types/RunsOn.dhall 21 | sha256:17864110f3cc91183c178f8218967c500f3493391e5327740dd1f19c74eb6ee2 22 | , Env = 23 | ./types/Env.dhall 24 | sha256:e73a2ec07449acffe1a4ba9cd261b845a8beb8f81fbc1415575639e99da668e6 25 | , Service = 26 | ./types/Service.dhall 27 | sha256:c957b80c6a0d53dce7bf05921c1983797b5d52958ded76244cd94ae80deb94e5 28 | , Workflow = 29 | ./types/Workflow.dhall 30 | sha256:8b9199905c1a9a900e2678c36018d93815c2339db5c5f65d54e9873f468c48f9 31 | , Push = 32 | ./types/events/Push.dhall 33 | sha256:5147b1dd6eca94aae5d217b979cac20ba64b7ec160488dd917f171cae451b135 34 | , PullRequest = 35 | ./types/events/PullRequest.dhall 36 | sha256:6b42c650c5a849dc6445287b85f6a55618f5e135be6cb8ef847a9c46d6c6672c 37 | , PullRequestReview = 38 | ./types/events/PullRequestReview.dhall 39 | sha256:f7a1d37a7fa9ce33f736813d132503dcf9c46a3fc72c7327c07d799af9f6ea63 40 | , PullRequestTarget = 41 | ./types/events/PullRequestTarget.dhall 42 | sha256:20591763afd7bd762652e3bd5c856fc76b5f21c207e89bde486910e6ecada115 43 | , PullRequestTarget/types = 44 | ./types/events/pull_request_target/types.dhall 45 | sha256:d5c8dc5f02a449316dc2a8ac0e1b145b545ba73c900bfc2bc97f097929af3f1c 46 | , Delete = 47 | ./types/events/Delete.dhall 48 | sha256:0912602a19e01dcff30f351958d2d9b69519c9be61b57b1b32a2a569bf8bf5f9 49 | , Concurrency = 50 | ./types/Concurrency.dhall 51 | sha256:76a98598b0b13d496c062d301b27c82059be340aae993285c6b345ec494a4913 52 | , Container = 53 | ./types/Container.dhall 54 | sha256:6d48c2461a004fb32d7b04f8716621a6f556fccb4ae66b4df20ff4de9b753e09 55 | , Permission = 56 | ./types/Permission.dhall 57 | sha256:b2a2f093af7412e34040a806e226ee4e7d691bd18df5c46bbfcc7cd222a37a2d 58 | , PermissionAccess = 59 | ./types/PermissionAccess.dhall 60 | sha256:50f036b7dc434a4b2e7e847943fe5c31846bf38ec1795de8baafe76cfe6382b6 61 | , Schedule = 62 | ./types/events/Schedule.dhall 63 | sha256:eb91edc996fadffb9cac1b67a4da220eed6bf54e96f7b8accbb613462e402537 64 | , Input = 65 | ./types/Input.dhall 66 | sha256:03df056682410688325a8cca24cd3c167b2db0a1b87596450de5638ffaa68b2c 67 | , InputType = 68 | ./types/InputType.dhall 69 | sha256:abf2c8ba31afdcd4a7ffc485968d38395dc2e36fbd8d748a6889b532fdc6209f 70 | , Output = 71 | ./types/Output.dhall 72 | sha256:4c7baccef8bd151904013c18b9cb539944019e8d85c2cb53c89d01988cde052c 73 | , Secret = 74 | ./types/Secret.dhall 75 | sha256:8db70cb6694b1748740dd506ebb8e35af3baa01cf3e1b7883dbac2637703c081 76 | , RepositoryDispatch = 77 | ./types/events/RepositoryDispatch.dhall 78 | sha256:f7a1d37a7fa9ce33f736813d132503dcf9c46a3fc72c7327c07d799af9f6ea63 79 | , WorkflowCall = 80 | ./types/events/WorkflowCall.dhall 81 | sha256:08e5e74916cbdd4bb28988b144ecec79ece5d56336d84e458fc9e2985b0ba681 82 | , WorkflowDispatch = 83 | ./types/events/WorkflowDispatch.dhall 84 | sha256:7c424307eed6fd275ccba117a66d3850b71ea6d41791d0544d1fad6f2ac5025a 85 | , WorkflowRun = 86 | ./types/events/WorkflowRun.dhall 87 | sha256:63a3c3130a74d1af7e25a73b55ab719cda4a26ba0bfdee72214be7e43d23c46a 88 | , Release = 89 | ./types/events/Release.dhall 90 | sha256:6dc17afaa0a74325dfd226bdc60d96e737978c8be500856b84d7075e869cad87 91 | , Release/types = 92 | ./types/events/release/types.dhall 93 | sha256:7a43a2198599fb074e451d67c6afcdecf65205ffe909e1e702eb2f567d5f3889 94 | , actions/HaskellSetup = 95 | ./types/actions/HaskellSetup.dhall 96 | sha256:3cfef5c383d40623d0766715715c881583623bf6e11a0ad0b9946d8eaeffa6c5 97 | , actions/checkout = 98 | ./types/actions/Checkout.dhall 99 | sha256:bb5e351b16c5f15bdd76f111fc2ae43e1190e66b8805c429a05c2d41f661f30d 100 | , MergeGroup = 101 | ./types/events/MergeGroup.dhall 102 | sha256:6932501dad0293756c78e48f64ae6b5549d373f7a178c26e300b69341de81fd6 103 | , MergeGroup/types = 104 | ./types/events/merge_group/types.dhall 105 | sha256:395eaa0f656449d1bca8c63e6631a999c47deab93659ad1a2b4999d415f8d0ac 106 | , ContinueOnError = 107 | ./types/ContinueOnError.dhall 108 | sha256:83ad8f8eea100277b6658ac27c590d6ee43df14e4d1fc49a55c691e1033fd3e9 109 | } 110 | -------------------------------------------------------------------------------- /types/Concurrency.dhall: -------------------------------------------------------------------------------- 1 | { group : Text, cancel-in-progress : Bool } 2 | -------------------------------------------------------------------------------- /types/Container.dhall: -------------------------------------------------------------------------------- 1 | -- This expression is only suitable for the most simple container representations: 2 | -- 3 | -- TODO: Add the remaining fields as per 4 | -- https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idcontainer 5 | { image : Text, options : Optional Text } 6 | -------------------------------------------------------------------------------- /types/ContinueOnError.dhall: -------------------------------------------------------------------------------- 1 | < Expression : Text | Boolean : Bool > 2 | -------------------------------------------------------------------------------- /types/Credentials.dhall: -------------------------------------------------------------------------------- 1 | { username : Text, password : Text } 2 | -------------------------------------------------------------------------------- /types/Defaults.dhall: -------------------------------------------------------------------------------- 1 | let Run 2 | : Type 3 | = { shell : Optional Text, working-directory : Optional Text } 4 | 5 | in { run : Optional Run } 6 | -------------------------------------------------------------------------------- /types/Env.dhall: -------------------------------------------------------------------------------- 1 | List { mapKey : Text, mapValue : Text } 2 | -------------------------------------------------------------------------------- /types/Input.dhall: -------------------------------------------------------------------------------- 1 | { description : Optional Text, required : Bool, default : Optional Text, type : Optional ./InputType.dhall } 2 | -------------------------------------------------------------------------------- /types/InputType.dhall: -------------------------------------------------------------------------------- 1 | < boolean 2 | | choice 3 | | number 4 | | environment 5 | | string 6 | > 7 | -------------------------------------------------------------------------------- /types/Job.dhall: -------------------------------------------------------------------------------- 1 | let Concurrency = ./Concurrency.dhall 2 | 3 | let Container = ./Container.dhall 4 | 5 | let Defaults = ./Defaults.dhall 6 | 7 | let Env = ./Env.dhall 8 | 9 | let JobEnv = ./JobEnv.dhall 10 | 11 | let RunsOn = ./RunsOn.dhall 12 | 13 | let Service = ./Service.dhall 14 | 15 | let Step = ./Step.dhall 16 | 17 | let Strategy = ./Strategy.dhall 18 | 19 | let Permission = ./Permission.dhall 20 | 21 | let PermissionAccess = ./PermissionAccess.dhall 22 | 23 | let ContinueOnError = ./ContinueOnError.dhall 24 | 25 | in { name : Optional Text 26 | , needs : Optional (List Text) 27 | , continue-on-error : Optional ContinueOnError 28 | , runs-on : RunsOn 29 | , environment : Optional JobEnv 30 | , strategy : Optional Strategy 31 | , outputs : Optional (List { mapKey : Text, mapValue : Text }) 32 | , env : Optional Env 33 | , defaults : Optional Defaults 34 | , steps : List Step 35 | , timeout-minutes : Optional Natural 36 | , `if` : Optional Text 37 | , services : Optional (List { mapKey : Text, mapValue : Service }) 38 | , container : Optional Container 39 | , concurrency : Optional Concurrency 40 | , permissions : 41 | Optional (List { mapKey : Permission, mapValue : PermissionAccess }) 42 | , secrets : Optional (List { mapKey : Text, mapValue : Text }) 43 | } 44 | -------------------------------------------------------------------------------- /types/JobEnv.dhall: -------------------------------------------------------------------------------- 1 | { name : Text, url : Optional Text } 2 | -------------------------------------------------------------------------------- /types/On.dhall: -------------------------------------------------------------------------------- 1 | let Push = ./events/Push.dhall 2 | 3 | let PullRequest = ./events/PullRequest.dhall 4 | 5 | let PullRequestReview = ./events/PullRequestReview.dhall 6 | 7 | let Delete = ./events/Delete.dhall 8 | 9 | let Schedule = ./events/Schedule.dhall 10 | 11 | let RepositoryDispatch = ./events/RepositoryDispatch.dhall 12 | 13 | let WorkflowCall = ./events/WorkflowCall.dhall 14 | 15 | let WorkflowDispatch = ./events/WorkflowDispatch.dhall 16 | 17 | let WorkflowRun = ./events/WorkflowRun.dhall 18 | 19 | let Release = ./events/Release.dhall 20 | 21 | let MergeGroup = ./events/MergeGroup.dhall 22 | 23 | let PullRequestTarget = ./events/PullRequestTarget.dhall 24 | 25 | in { push : Optional Push 26 | , pull_request : Optional PullRequest 27 | , pull_request_review : Optional PullRequestReview 28 | , pull_request_target : Optional PullRequestTarget 29 | , delete : Optional Delete 30 | , schedule : Optional (List Schedule) 31 | , repository_dispatch : Optional RepositoryDispatch 32 | , workflow_call : Optional WorkflowCall 33 | , workflow_dispatch : Optional WorkflowDispatch 34 | , workflow_run : Optional WorkflowRun 35 | , release : Optional Release 36 | , merge_group : Optional MergeGroup 37 | } 38 | -------------------------------------------------------------------------------- /types/Output.dhall: -------------------------------------------------------------------------------- 1 | { description : Optional Text, value : Text } 2 | -------------------------------------------------------------------------------- /types/Permission.dhall: -------------------------------------------------------------------------------- 1 | < actions 2 | | checks 3 | | contents 4 | | deployments 5 | | id-token 6 | | issues 7 | | discussions 8 | | packages 9 | | pages 10 | | pull-requests 11 | | repository-projects 12 | | security-events 13 | | statuses 14 | > 15 | -------------------------------------------------------------------------------- /types/PermissionAccess.dhall: -------------------------------------------------------------------------------- 1 | < read | write | none > 2 | -------------------------------------------------------------------------------- /types/RunsOn.dhall: -------------------------------------------------------------------------------- 1 | < windows-latest 2 | | windows-2022 3 | | windows-2019 4 | | ubuntu-latest 5 | | `ubuntu-24.04` 6 | | `ubuntu-22.04` 7 | | `ubuntu-20.04` 8 | | `ubuntu-18.04` 9 | | `ubuntu-16.04` 10 | | macos-latest 11 | | macos-14 12 | | macos-13 13 | | macos-12 14 | | `macos-10.05` 15 | | self-hosted 16 | | custom : List Text 17 | | `${{ matrix.os }}` 18 | > 19 | -------------------------------------------------------------------------------- /types/Secret.dhall: -------------------------------------------------------------------------------- 1 | { description : Optional Text, required : Bool } 2 | -------------------------------------------------------------------------------- /types/Service.dhall: -------------------------------------------------------------------------------- 1 | let Credentials = ./Credentials.dhall 2 | 3 | let Env = ./Env.dhall 4 | 5 | in { image : Text 6 | , credentials : Optional Credentials 7 | , env : Optional Env 8 | , ports : Optional (List Text) 9 | , volumes : Optional (List Text) 10 | , options : Optional Text 11 | } 12 | -------------------------------------------------------------------------------- /types/Step.dhall: -------------------------------------------------------------------------------- 1 | let Env = ./Env.dhall 2 | 3 | let Strategy = ./Strategy.dhall 4 | 5 | in { id : Optional Text 6 | , name : Optional Text 7 | , env : Optional Env 8 | , run : Optional Text 9 | , uses : Optional Text 10 | , shell : Optional Text 11 | , `with` : Optional (List { mapKey : Text, mapValue : Text }) 12 | , continue-on-error : Optional Bool 13 | , strategy : Optional Strategy 14 | , `if` : Optional Text 15 | , working-directory : Optional Text 16 | , timeout-minutes : Optional Natural 17 | } 18 | -------------------------------------------------------------------------------- /types/Strategy.dhall: -------------------------------------------------------------------------------- 1 | { matrix : List { mapKey : Text, mapValue : List Text } 2 | , fail-fast : Optional Bool 3 | , max-parallel : Optional Natural 4 | } 5 | -------------------------------------------------------------------------------- /types/Workflow.dhall: -------------------------------------------------------------------------------- 1 | let On = ./On.dhall 2 | 3 | let Env = ./Env.dhall 4 | 5 | let Concurrency = ./Concurrency.dhall 6 | 7 | let Defaults = ./Defaults.dhall 8 | 9 | let Job = ./Job.dhall 10 | 11 | let Permission = ./Permission.dhall 12 | 13 | let PermissionAccess = ./PermissionAccess.dhall 14 | 15 | in { name : Text 16 | , on : On 17 | , env : Optional Env 18 | , concurrency : Optional Concurrency 19 | , defaults : Optional Defaults 20 | , permissions : 21 | Optional (List { mapKey : Permission, mapValue : PermissionAccess }) 22 | , jobs : List { mapKey : Text, mapValue : Job } 23 | } 24 | -------------------------------------------------------------------------------- /types/actions/Checkout.dhall: -------------------------------------------------------------------------------- 1 | { repository : Optional Text 2 | , ref : Optional Text 3 | , token : Optional Text 4 | , ssh-key : Optional Text 5 | , ssh-known-hosts : Optional Text 6 | , ssh-strict : Optional Bool 7 | , ssh-user : Optional Text 8 | , persist-credentials : Optional Bool 9 | , path : Optional Text 10 | , clean : Optional Bool 11 | , filter : Optional Text 12 | , sparse-checkout : Optional Text 13 | , sparse-checkout-cone-mode : Optional Bool 14 | , fetch-depth : Optional Natural 15 | , fetch-tags : Optional Bool 16 | , show-progress : Optional Bool 17 | , lfs : Optional Bool 18 | , submodules : Optional Text 19 | , set-safe-directory : Optional Bool 20 | , github-server-url : Optional Text 21 | } -------------------------------------------------------------------------------- /types/actions/HaskellSetup.dhall: -------------------------------------------------------------------------------- 1 | { ghc-version : Optional Text 2 | , cabal-version : Optional Text 3 | , stack-version : Optional Text 4 | , enable-stack : Optional Bool 5 | , stack-no-global : Optional Bool 6 | , stack-setup-ghc : Optional Bool 7 | , disable-matcher : Optional Bool 8 | } 9 | -------------------------------------------------------------------------------- /types/events/Delete.dhall: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /types/events/MergeGroup.dhall: -------------------------------------------------------------------------------- 1 | { types : Optional (List ./merge_group/types.dhall) } 2 | -------------------------------------------------------------------------------- /types/events/PullRequest.dhall: -------------------------------------------------------------------------------- 1 | { branches : Optional (List Text) 2 | , branches-ignore : Optional (List Text) 3 | , tags : Optional (List Text) 4 | , paths : Optional (List Text) 5 | , paths-ignore : Optional (List Text) 6 | , types : Optional (List Text) 7 | } 8 | -------------------------------------------------------------------------------- /types/events/PullRequestReview.dhall: -------------------------------------------------------------------------------- 1 | { types : Optional (List Text) } 2 | -------------------------------------------------------------------------------- /types/events/PullRequestTarget.dhall: -------------------------------------------------------------------------------- 1 | { types : Optional ./pull_request_target/types.dhall 2 | , branches : Optional (List Text) 3 | , branches-ignore : Optional (List Text) 4 | , paths : Optional (List Text) 5 | , paths-ignore : Optional (List Text) 6 | } 7 | -------------------------------------------------------------------------------- /types/events/Push.dhall: -------------------------------------------------------------------------------- 1 | { branches : Optional (List Text) 2 | , branches-ignore : Optional (List Text) 3 | , tags : Optional (List Text) 4 | , paths : Optional (List Text) 5 | , paths-ignore : Optional (List Text) 6 | } 7 | -------------------------------------------------------------------------------- /types/events/Release.dhall: -------------------------------------------------------------------------------- 1 | { types : Optional (List ./release/types.dhall) } 2 | -------------------------------------------------------------------------------- /types/events/RepositoryDispatch.dhall: -------------------------------------------------------------------------------- 1 | { types : Optional (List Text) } 2 | -------------------------------------------------------------------------------- /types/events/Schedule.dhall: -------------------------------------------------------------------------------- 1 | { cron : Text } 2 | -------------------------------------------------------------------------------- /types/events/WorkflowCall.dhall: -------------------------------------------------------------------------------- 1 | { inputs : Optional (List { mapKey : Text, mapValue : ../Input.dhall }) 2 | , outputs : Optional (List { mapKey : Text, mapValue : ../Output.dhall }) 3 | , secrets : Optional (List { mapKey : Text, mapValue : ../Secret.dhall }) 4 | } 5 | -------------------------------------------------------------------------------- /types/events/WorkflowDispatch.dhall: -------------------------------------------------------------------------------- 1 | { inputs : Optional (List { mapKey : Text, mapValue : ../Input.dhall }) } 2 | -------------------------------------------------------------------------------- /types/events/WorkflowRun.dhall: -------------------------------------------------------------------------------- 1 | { workflows : List Text 2 | , types : Optional (List Text) 3 | , branches : Optional (List Text) 4 | } 5 | -------------------------------------------------------------------------------- /types/events/merge_group/types.dhall: -------------------------------------------------------------------------------- 1 | < checks_requested > 2 | -------------------------------------------------------------------------------- /types/events/pull_request_target/types.dhall: -------------------------------------------------------------------------------- 1 | < assigned | opened | synchronize | reopened | closed > 2 | -------------------------------------------------------------------------------- /types/events/release/types.dhall: -------------------------------------------------------------------------------- 1 | < published 2 | | unpublished 3 | | created 4 | | edited 5 | | deleted 6 | | prereleased 7 | | released 8 | > 9 | --------------------------------------------------------------------------------