[GH-ISSUE #736] Unable to interpolate stringcontains(github.event.commits[0].message TypeError: Cannot access member '0' of undefined #463

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

Originally created by @patsevanton on GitHub (Jun 15, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/736

Originally assigned to: @catthehacker on GitHub.

Hello! Thans for act

System information

  • Operating System: Linux
  • Architecture: x64 (64-bit)
  • Apple M1: no
  • Docker version: 20.10.6
  • Docker image used in act:
  • act version: 0.2.23
git clone https://github.com/Drill4J/admin
cd admin

Run act

act -v
DEBU[0000] Loading environment from /home/apatsev/github/admin/.env
DEBU[0000] Loading secrets from /home/apatsev/github/admin/.secrets
DEBU[0000] Loading workflows from '/home/apatsev/github/admin/.github/workflows'
DEBU[0000] Loading workflows recursively
DEBU[0000] Found workflow 'check.yml' in '/home/apatsev/github/admin/.github/workflows/check.yml'
DEBU[0000] Found workflow 'publish.yml' in '/home/apatsev/github/admin/.github/workflows/publish.yml'
DEBU[0000] Found workflow 'release.yml' in '/home/apatsev/github/admin/.github/workflows/release.yml'
DEBU[0000] Reading workflow '/home/apatsev/github/admin/.github/workflows/check.yml'
DEBU[0000] Correcting if statements '/home/apatsev/github/admin/.github/workflows/check.yml'
DEBU[0000] Reading workflow '/home/apatsev/github/admin/.github/workflows/publish.yml'
DEBU[0000] Correcting if statements '/home/apatsev/github/admin/.github/workflows/publish.yml'
DEBU[0000] Reading workflow '/home/apatsev/github/admin/.github/workflows/release.yml'
DEBU[0000] Correcting if statements '/home/apatsev/github/admin/.github/workflows/release.yml'
DEBU[0000] Planning event: push
? Please choose the default image you want to use with act:

  - Large size image: +20GB Docker image, includes almost all tools used on GitHub Actions (IMPORTANT: currently only ubuntu-18.04 platform is available)
  - Medium size image: ~500MB, includes only necessary tools to bootstrap actions and aims to be compatible with all actions
  - Micro size image: <200MB, contains only NodeJS required to bootstrap actions, doesn't work with all actions

Default image and other options can be changed manually in ~/.actrc (please refer to https://github.com/nektos/act#configuration for additional information about file structure) Medium
DEBU[0001] Loading slug from git directory '/home/apatsev/github/admin/.git'
DEBU[0001] Found revision: 865a4e02af5018b0ab8c65bb872a1a7b6e09687a
DEBU[0001] Loading revision from git directory '/home/apatsev/github/admin/.git'
DEBU[0001] Found revision: 865a4e02af5018b0ab8c65bb872a1a7b6e09687a
DEBU[0001] HEAD points to '865a4e02af5018b0ab8c65bb872a1a7b6e09687a'
DEBU[0001] using github ref: refs/heads/bugfix/EPMDJ-7718
DEBU[0001] context env => map[ACT:true]
DEBU[0001] Evaluating '!contains(github['event']['commits'][0]['message'], '[skip ci]')' instead of '!contains(github.event.commits[0].message, '[skip ci]')'
ERRO[0001] Unable to interpolate string '${{!contains(github.event.commits[0].message, '[skip ci]')}}' - [TypeError: Cannot access member '0' of undefined]
DEBU[0001] expression '${{!contains(github.event.commits[0].message, '[skip ci]')}}' evaluated to 'false'
[Release/release] Skipping job 'release' due to '${{!contains(github.event.commits[0].message, '[skip ci]')}}'

How fixed?

Originally created by @patsevanton on GitHub (Jun 15, 2021). Original GitHub issue: https://github.com/nektos/act/issues/736 Originally assigned to: @catthehacker on GitHub. Hello! Thans for act ## System information - Operating System: Linux - Architecture: x64 (64-bit) - Apple M1: no - Docker version: 20.10.6 - Docker image used in `act`: - `act` version: 0.2.23 ``` git clone https://github.com/Drill4J/admin cd admin ``` Run act ``` act -v DEBU[0000] Loading environment from /home/apatsev/github/admin/.env DEBU[0000] Loading secrets from /home/apatsev/github/admin/.secrets DEBU[0000] Loading workflows from '/home/apatsev/github/admin/.github/workflows' DEBU[0000] Loading workflows recursively DEBU[0000] Found workflow 'check.yml' in '/home/apatsev/github/admin/.github/workflows/check.yml' DEBU[0000] Found workflow 'publish.yml' in '/home/apatsev/github/admin/.github/workflows/publish.yml' DEBU[0000] Found workflow 'release.yml' in '/home/apatsev/github/admin/.github/workflows/release.yml' DEBU[0000] Reading workflow '/home/apatsev/github/admin/.github/workflows/check.yml' DEBU[0000] Correcting if statements '/home/apatsev/github/admin/.github/workflows/check.yml' DEBU[0000] Reading workflow '/home/apatsev/github/admin/.github/workflows/publish.yml' DEBU[0000] Correcting if statements '/home/apatsev/github/admin/.github/workflows/publish.yml' DEBU[0000] Reading workflow '/home/apatsev/github/admin/.github/workflows/release.yml' DEBU[0000] Correcting if statements '/home/apatsev/github/admin/.github/workflows/release.yml' DEBU[0000] Planning event: push ? Please choose the default image you want to use with act: - Large size image: +20GB Docker image, includes almost all tools used on GitHub Actions (IMPORTANT: currently only ubuntu-18.04 platform is available) - Medium size image: ~500MB, includes only necessary tools to bootstrap actions and aims to be compatible with all actions - Micro size image: <200MB, contains only NodeJS required to bootstrap actions, doesn't work with all actions Default image and other options can be changed manually in ~/.actrc (please refer to https://github.com/nektos/act#configuration for additional information about file structure) Medium DEBU[0001] Loading slug from git directory '/home/apatsev/github/admin/.git' DEBU[0001] Found revision: 865a4e02af5018b0ab8c65bb872a1a7b6e09687a DEBU[0001] Loading revision from git directory '/home/apatsev/github/admin/.git' DEBU[0001] Found revision: 865a4e02af5018b0ab8c65bb872a1a7b6e09687a DEBU[0001] HEAD points to '865a4e02af5018b0ab8c65bb872a1a7b6e09687a' DEBU[0001] using github ref: refs/heads/bugfix/EPMDJ-7718 DEBU[0001] context env => map[ACT:true] DEBU[0001] Evaluating '!contains(github['event']['commits'][0]['message'], '[skip ci]')' instead of '!contains(github.event.commits[0].message, '[skip ci]')' ERRO[0001] Unable to interpolate string '${{!contains(github.event.commits[0].message, '[skip ci]')}}' - [TypeError: Cannot access member '0' of undefined] DEBU[0001] expression '${{!contains(github.event.commits[0].message, '[skip ci]')}}' evaluated to 'false' [Release/release] Skipping job 'release' due to '${{!contains(github.event.commits[0].message, '[skip ci]')}}' ``` How fixed?
kerem 2026-03-01 21:43:39 +03:00
Author
Owner

@github-actions[bot] commented on GitHub (Jul 16, 2021):

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

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

@aoberest commented on GitHub (Sep 14, 2021):

Hello.
I have the same issue on 0.2.24

<!-- gh-comment-id:918778361 --> @aoberest commented on GitHub (Sep 14, 2021): Hello. I have the same issue on 0.2.24
Author
Owner

@ZauberNerd commented on GitHub (Feb 1, 2022):

This gets a little bit better with #908 but since it accesses github.event it still needs an event.json payload, because otherwise github.event.commits is not an array.

<!-- gh-comment-id:1027168281 --> @ZauberNerd commented on GitHub (Feb 1, 2022): This gets a little bit better with #908 but since it accesses `github.event` it still needs an event.json payload, because otherwise `github.event.commits` is not an array.
Author
Owner

@catthehacker commented on GitHub (Mar 1, 2022):

I think this scenario is better to specifically require event file

<!-- gh-comment-id:1055847526 --> @catthehacker commented on GitHub (Mar 1, 2022): I think this scenario is better to specifically require event file
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#463
No description provided.