Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix behavior for create-args without env name #141

Merged
merged 3 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
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
8 changes: 0 additions & 8 deletions .github/labeler.yml

This file was deleted.

6 changes: 0 additions & 6 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@ jobs:
pr-label:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
if: github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'edited' || github.event.action == 'synchronize'
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
id: labeler
- uses: mheap/github-action-required-labels@v5
if: steps.labeler.outputs.new-labels == ''
with:
labels: bug,enhancement,ci,documentation,dependencies,ignore-for-release
mode: minimum
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,3 +271,18 @@ jobs:
id: setup-micromamba
- run: |
test "${{ steps.setup-micromamba.outputs.environment-path }}" = ""

# not properly testable
# https://github.com/actions/runner/issues/2347
# https://github.com/orgs/community/discussions/15452
# create-args-no-env-name:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: ./
# with:
# create-args: >-
# python
# pytest
# - run: exit 1
# if: success()
3 changes: 3 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions dist/post.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ const validateInputs = (inputs: Inputs): void => {
if (inputs.initShell?.includes('none') && inputs.initShell.length !== 1) {
throw new Error("You cannot specify 'none' with other shells.")
}
if (!inputs.environmentName && !inputs.environmentFile && inputs.createArgs?.length) {
throw new Error('You need to specify an environment name.')
}
}

const assertOptions = (options: Options) => {
Expand Down
Loading