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

Composite Action Required property is missing: shell #2227

Open
phoolish opened this issue Feb 23, 2024 · 0 comments
Open

Composite Action Required property is missing: shell #2227

phoolish opened this issue Feb 23, 2024 · 0 comments
Labels
kind/bug Something isn't working

Comments

@phoolish
Copy link

phoolish commented Feb 23, 2024

Bug report info

act

Command used with act

act pull_request

Describe issue

My workflow runs fine locally with act, but when I run it remotely I get this error Required property is missing: shell. This is a reference to run steps requiring shell key to be set in composite actions. Metadata Docs. act seems to ignore the requirement and works as expected whether it is set or not.

- name: Set Greeting
      run: echo "Hello $INPUT_WHO_TO_GREET."
      shell: bash

Link to GitHub repository

No response

Workflow content

# .github/actions/run-in-image/action.yaml
---
name: 'Run command in compose image'
description: 'Run Bash Command in docker compose container and output tests results (when necessary)'
inputs:
  bash-command:
    description: 'Bash to command to run in the container'
    required: true
    type: string
  docker-service:
    default: app
    description: 'Docker compose service to run the command on'
    required: false
    type: string
  test-report-path:
    default: ''
    description: 'If a report path is provided, output test-report to github actions'
    type: string

runs:
  using: 'composite'
  steps:
    - name: Run BASH command on ${{ inputs.docker-service }}
      run: |
        docker compose run ${{ inputs.docker-service }} bash -c "${{ inputs.bash-command }}"
    - name: Test Report
      uses: mikepenz/action-junit-report@v4
      if: ${{ inputs.test-report-path != '' && github.actor != 'nektos/act' && (success() || failure()) }}
      with:
        name: test-results
        report_paths: ${{ inputs.test-report-path }}
# .github/workflows/test.yaml
---
name: Test Image

on:
  pull_request:
    branches:
      - develop
  push:
    branches:
      - develop

env:
  COMPOSE_FILE: ${{ github.actor == 'nektos/act' && 'compose.test.yaml' || 'compose.test.linux.yaml' }}
  IMAGE_TAG: ga-${{ github.event.number }}

permissions:
  id-token: write
  contents: read

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

jobs:
  bundle_check:
    name: Bundle Check
    runs-on: ubuntu-latest
    env:
      COMPOSE_PROJECT_NAME: bundle_check
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - uses: ./.github/actions/run-in-image
        with:
          bash-command: "bundle check --verbose"
          docker-service: app_init

Relevant log output

None

Additional information

No response

@phoolish phoolish added the kind/bug Something isn't working label Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant