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

GitHub Actions doesn't work in container #461

Closed
suzuki-shunsuke opened this issue Jun 21, 2023 · 1 comment · Fixed by #463
Closed

GitHub Actions doesn't work in container #461

suzuki-shunsuke opened this issue Jun 21, 2023 · 1 comment · Fixed by #463
Labels
bug Something isn't working

Comments

@suzuki-shunsuke
Copy link
Member

Overview

GitHub Actions doesn't work in container.

https://docs.github.com/en/actions/using-jobs/running-jobs-in-a-container

How to reproduce

https://github.com/suzuki-shunsuke/test-github-action/blob/ee42b9ad6e5e180d189cf585357bb47a74b499b8/.github/workflows/test.yaml

---
name: test
on: pull_request
jobs:
  test:
    runs-on: ubuntu-latest
    container:
      image: golang:1.20
    steps:
      - uses: actions/checkout@83b7061638ee4956cf7545a6f7efe594e5ad0247 # v3.5.1
      - uses: aquaproj/aqua-installer@v2.1.1
        with:
          aqua_version: v2.9.0
        env:
          GITHUB_TOKEN: ${{github.token}}

https://github.com/suzuki-shunsuke/test-github-action/actions/runs/5332029013/jobs/9660678516?pr=162

Run "/home/runner/work/_actions/aquaproj/aqua-installer/v2.1.1/aqua-installer" -v "$AQUA_VERSION"
/__w/_temp/31[19](https://github.com/suzuki-shunsuke/test-github-action/actions/runs/5332029013/jobs/9660678516?pr=162#step:4:22)fcdf-4b2f-4ff8-a83a-06ceee381e9d.sh: line 1: /home/runner/work/_actions/aquaproj/aqua-installer/v2.1.1/aqua-installer: No such file or directory
Error: Process completed with exit code 127.
@suzuki-shunsuke suzuki-shunsuke added the bug Something isn't working label Jun 21, 2023
suzuki-shunsuke added a commit that referenced this issue Jun 21, 2023
@suzuki-shunsuke
Copy link
Member Author

suzuki-shunsuke commented Jun 21, 2023

It seems ${{ github.action_path }} isn't found in the container.

Run ls "/home/runner/work/_actions/aquaproj/aqua-installer/debug-461"
ls: cannot access '/home/runner/work/_actions/aquaproj/aqua-installer/debug-461': No such file or directory

suzuki-shunsuke added a commit that referenced this issue Jun 22, 2023
* fix: support running action in a container

- #461

* fix: fix YAML parse error

```
Error: /home/runner/work/aqua-installer/aqua-installer/./action.yaml:
Error: /home/runner/work/aqua-installer/aqua-installer/./action.yaml: (Line: 91, Col: 1, Idx: 3203) - (Line: 91, Col: 1, Idx: 3203): While scanning a simple key, could not find expected ':'.
Error: System.ArgumentException: Unexpected type '' encountered while reading 'action manifest root'. The type 'MappingToken' was expected.
   at GitHub.DistributedTask.ObjectTemplating.Tokens.TemplateTokenExtensions.AssertMapping(TemplateToken value, String objectDescription)
   at GitHub.Runner.Worker.ActionManifestManager.Load(IExecutionContext executionContext, String manifestFile)
Error: Fail to load /home/runner/work/aqua-installer/aqua-installer/./action.yaml
```

* ci: test action in a container
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.

1 participant