[GH-ISSUE #783] Using "uses" inside composite action #491

Closed
opened 2026-03-01 21:43:52 +03:00 by kerem · 11 comments
Owner

Originally created by @nenadfilipovic on GitHub (Aug 22, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/783

System information

  • Operating System: Linux
  • Architecture: x64
  • Apple M1: -
  • Docker version: 20.10.8
  • Docker image used in act: custom image
  • act version: 0.2.24

Expected behaviour

I would like to use other actions inside my own actions and it is now possible on GitHub actions: https://github.com/actions/runner/issues/646#issuecomment-901336347

Is this feature supported in act?

This is custom action:

name: 'Login to GitHub Container Registry'
description: 'Action that logs user in to GitHub Container Registry'

inputs:
  token:
    required: true
    description: 'User GitHub token'

runs:
  using: 'composite'
  steps:
    - name: Login
      uses: docker/login-action@v1
      with:
        registry: ghcr.io
        username: ${{ github.actor }}
        password: ${{ inputs.token }}

Actual behaviour

Error: (StepID: Login): Unexpected value 'uses'

Workflow and/or repository

job-2:
    name: End to end (E2E) tests
    runs-on: ubuntu-latest

    steps:
      - name: Checkout GitHub repository
        uses: actions/checkout@v2

      - name: Login to ghcr
        uses: ./.github/actions/docker-ghcr-login
        with:
          token: ${{ secrets.GITHUB_TOKEN }}

Steps to reproduce

act pull_request -j job-2

act output

Error: (StepID: Login): Unexpected value 'uses'

Originally created by @nenadfilipovic on GitHub (Aug 22, 2021). Original GitHub issue: https://github.com/nektos/act/issues/783 ## System information <!-- - Operating System: < Windows | Linux | macOS | etc... > - Architecture: < x64 (64-bit) | x86 (32-bit) | arm64 (64-bit) | arm (32-bit) | etc... > - Apple M1: < yes | no > - Docker version: < output of `docker system info -f "{{.ServerVersion}}"` > - Docker image used in `act`: < can be omitted if it's included in log > - `act` version: < output of `act --version`, if you've built `act` yourself, please provide commit hash > --> - Operating System: Linux - Architecture: x64 - Apple M1: - - Docker version: 20.10.8 - Docker image used in `act`: custom image - `act` version: 0.2.24 ## Expected behaviour I would like to use other actions inside my own actions and it is now possible on GitHub actions: https://github.com/actions/runner/issues/646#issuecomment-901336347 Is this feature supported in act? This is custom action: ```yml name: 'Login to GitHub Container Registry' description: 'Action that logs user in to GitHub Container Registry' inputs: token: required: true description: 'User GitHub token' runs: using: 'composite' steps: - name: Login uses: docker/login-action@v1 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ inputs.token }} ``` ## Actual behaviour `Error: (StepID: Login): Unexpected value 'uses'` ## Workflow and/or repository ```yml job-2: name: End to end (E2E) tests runs-on: ubuntu-latest steps: - name: Checkout GitHub repository uses: actions/checkout@v2 - name: Login to ghcr uses: ./.github/actions/docker-ghcr-login with: token: ${{ secrets.GITHUB_TOKEN }} ``` ## Steps to reproduce `act pull_request -j job-2` ## `act` output `Error: (StepID: Login): Unexpected value 'uses'`
Author
Owner

@akitson-degreed commented on GitHub (Aug 27, 2021):

I am also having this issue.

<!-- gh-comment-id:907394620 --> @akitson-degreed commented on GitHub (Aug 27, 2021): I am also having this issue.
Author
Owner

@nenadfilipovic commented on GitHub (Aug 28, 2021):

It needs to be implemented.

<!-- gh-comment-id:907565923 --> @nenadfilipovic commented on GitHub (Aug 28, 2021): It needs to be implemented.
Author
Owner

@sarahsturgeon commented on GitHub (Aug 29, 2021):

Also experiencing this

<!-- gh-comment-id:907753242 --> @sarahsturgeon commented on GitHub (Aug 29, 2021): Also experiencing this
Author
Owner

@github-actions[bot] commented on GitHub (Sep 29, 2021):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:929710718 --> @github-actions[bot] commented on GitHub (Sep 29, 2021): Issue is stale and will be closed in 14 days unless there is new activity
Author
Owner

@shawnmclean commented on GitHub (Nov 3, 2021):

no! bad bot!

<!-- gh-comment-id:960099665 --> @shawnmclean commented on GitHub (Nov 3, 2021): no! bad bot!
Author
Owner

@DanySK commented on GitHub (Nov 23, 2021):

I'm being hit by this as well

<!-- gh-comment-id:976446853 --> @DanySK commented on GitHub (Nov 23, 2021): I'm being hit by this as well
Author
Owner

@jayvdb commented on GitHub (Nov 30, 2021):

Here is a github action which uses this "composite" feature, causing the same error
https://github.com/palewire/install-python-pipenv-pipfile

Using https://github.com/xing/act/releases/tag/v0.2.25-xing.3-6cf9ed5 worked for me, as it contains some version of https://github.com/nektos/act/pull/793

<!-- gh-comment-id:982578925 --> @jayvdb commented on GitHub (Nov 30, 2021): Here is a github action which uses this "composite" feature, causing the same error https://github.com/palewire/install-python-pipenv-pipfile Using https://github.com/xing/act/releases/tag/v0.2.25-xing.3-6cf9ed5 worked for me, as it contains some version of https://github.com/nektos/act/pull/793
Author
Owner

@mangatmodi commented on GitHub (Feb 9, 2022):

Any plans to merge this upstream from https://github.com/xing/act/releases/tag/v0.2.25-xing.3-6cf9ed5 ?

<!-- gh-comment-id:1033637460 --> @mangatmodi commented on GitHub (Feb 9, 2022): Any plans to merge this upstream from https://github.com/xing/act/releases/tag/v0.2.25-xing.3-6cf9ed5 ?
Author
Owner

@catthehacker commented on GitHub (Feb 9, 2022):

@mangatmodi merge what exactly?

<!-- gh-comment-id:1033644005 --> @catthehacker commented on GitHub (Feb 9, 2022): @mangatmodi merge what exactly?
Author
Owner

@mangatmodi commented on GitHub (Feb 10, 2022):

@catthehacker Actually I had hit this same issue. I see that a fix was merged in the master in https://github.com/nektos/act/pull/514.

I tried sudo GOBIN=/usr/local/bin/ go install -v github.com/nektos/act@master and it worked :)

Thanks for this amazing tool...

<!-- gh-comment-id:1034836333 --> @mangatmodi commented on GitHub (Feb 10, 2022): @catthehacker Actually I had hit this same issue. I see that a fix was merged in the master in https://github.com/nektos/act/pull/514. I tried ` sudo GOBIN=/usr/local/bin/ go install -v github.com/nektos/act@master` and it worked :) Thanks for this amazing tool...
Author
Owner

@achekery commented on GitHub (Feb 13, 2022):

With github.com/nektos/act@df4ef4de80, updating the package to HEAD with brew is easier than before. So far so good using https://github.com/tj-actions/changed-files

brew unlink act && brew install act --HEAD
<!-- gh-comment-id:1038465869 --> @achekery commented on GitHub (Feb 13, 2022): With https://github.com/nektos/act/commit/df4ef4de808edb8e3b657e4e24c96f8643ffcd32, updating the package to HEAD with brew is easier than before. So far so good using https://github.com/tj-actions/changed-files ``` brew unlink act && brew install act --HEAD ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#491
No description provided.