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

YAML unmarshall errors with using container #235

Closed
watarukura opened this issue Nov 20, 2023 · 5 comments · Fixed by #236
Closed

YAML unmarshall errors with using container #235

watarukura opened this issue Nov 20, 2023 · 5 comments · Fixed by #236
Labels
bug Something isn't working
Milestone

Comments

@watarukura
Copy link

#197 is not same error
ghalint v0.2.3

---
name: test

on:
  pull_request:
    branches:
      - master
    paths:
      - ".github/workflows/test.yml"

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  lint:
    runs-on: ubuntu-latest
    container: "composer:2.6.5"
    timeout-minutes: 10
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
        with:
          sparse-checkout: |
            composer.json
            composer.lock
ERRO[0000] read a workflow file                          error="parse a workflow file as YAML: yaml: unmarshal errors:\n  line 18: cannot unmarshal !!str `compose...` into workflow.Container" program=ghalint version=0.2.3 workflow_file_path=.github/workflows/test.yaml

remove jobs.lint.container and success, but it's necessary for me.
v0.2.2 occurs no error.

@suzuki-shunsuke
Copy link
Owner

Thank you for your report.

Yeah, this is a bug of ghalint.
ghalint should accept a string.

When you only specify a container image, you can omit the image keyword.

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idcontainer

@suzuki-shunsuke suzuki-shunsuke added the bug Something isn't working label Nov 20, 2023
@suzuki-shunsuke
Copy link
Owner

suzuki-shunsuke commented Nov 20, 2023

I'll fix the bug soon.

There are two workarounds.

  1. Downgrade ghalint to v0.2.2
  2. Fix the field container
container:
  image: composer:2.6.5

@watarukura
Copy link
Author

Thanks!

@suzuki-shunsuke
Copy link
Owner

@suzuki-shunsuke suzuki-shunsuke added this to the v0.2.4 milestone Nov 20, 2023
@suzuki-shunsuke
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants