Skip to content

fix(schema): allow environment.deployment boolean - #6134

Open
Solaris-star wants to merge 1 commit into
nektos:masterfrom
Solaris-star:path-guard-6086-environment-deployment
Open

fix(schema): allow environment.deployment boolean#6134
Solaris-star wants to merge 1 commit into
nektos:masterfrom
Solaris-star:path-guard-6086-environment-deployment

Conversation

@Solaris-star

Copy link
Copy Markdown

Summary

Fixes #6086.

GitHub Actions added environment.deployment so workflows can use an environment without creating a deployment:

jobs:
  example:
    runs-on: ubuntu-latest
    environment:
      name: production
      deployment: false

Act's strict schema (job-environment-mapping) only allowed name and url, so act --validate --strict failed with Unknown Property deployment.

Changes

  • Add deployment (boolean) to pkg/schema/workflow_schema.json
  • Schema unit tests for deployment: true and deployment: false

Test plan

go test ./pkg/schema/ -count=1
# ok

GitHub Actions supports `environment.deployment: false` so a job can run
in an environment without creating a deployment object. Act's strict
workflow schema only knew `name` and `url`, so `--validate --strict`
failed with Unknown Property deployment.

Add the boolean field to job-environment-mapping and cover true/false
with schema tests.

Fixes nektos#6086
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

act --validate --strict fails with new environment: deployment: workflow setting.

1 participant