Skip to content

Using master does not pass in jobInputs #278

@clongo

Description

@clongo

Describe the bug
When using this action targeting master, the inputs are not passed into the function as jobInputs. I believe this is because dist/index.js has not been compiled with the latest ts code:

main.ts#L39
index.js#L126

To Reproduce
Steps to reproduce the behavior:

  1. Reference the action in a workflow with the inputs set and version pointing to master
    example ci.yml: (truncated)
on:
  workflow_dispatch:
    inputs:
      rebuild:
        description: 'Rebuild the branch before deploying'
        required: true
        type: boolean

env:
  SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

jobs:
  # Notify
  # This job will send a slack notification when the workflow is started.
  notify-start:
    if: always()
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          sparse-checkout: .github/config

      - name: Send Slack Notification - Started
        uses: act10ns/slack@master
        with:
          status: starting
          message: Starting Manual ${{ inputs.rebuild == true && 'Rebuild and ' || '' }}Deploy
          config: .github/config/slack.yml
          inputs: ${{ toJson(inputs) }}

example slack.yml (truncated)

  - title: RAW #This is a debug output to the slack message
    value: "{{#each this}}{{@key}}\n{{/each}}"
    short: false
  - title: Inputs
    value: "{{#each jobInputs}}{{@key}}: {{this}}\n{{/each}}"
    short: false

Expected behavior
I expect the inputs to get output in the slack message using the above field.

Screenshots
Github Action Job setup, referencing the latest SHA d2d8b23
image

Debug output of action missing jobInputs, (redacted org info)
image

Additional context
This is the RAW output in the slack message displaying all the available objects:

Starting Manual Deploy
RAW
env
payload
jobName
jobStatus
jobSteps
jobMatrix
eventName
workflow
workflowUrl
workflowRunUrl
repositoryName
repositoryUrl
runId
runNumber
sha
shortSha
branch
actor
action
ref
refType
refUrl
diffRef
diffUrl
description
sender
ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions