Skip to content

Scheduled workflow can't access secrets #25955

Discussion options

You must be logged in to vote

@douglatornell Scheduled workflows do receive secrets. Looking at your example, you can also see the masked secrets (the ***), so some value was passed to the action.

The problem is with the action you’re calling, looking at the code it tries to read head_commit from the JSON payload. That doesn’t exist for scheduled workflows and leads to this error:

github.com

pioug/le-slack-message/blob/087c7c6d7af33952a5b9bb49a72ed90489277cd2/index.js#L20

  1. const ACTION_NAME = core.getInput("ACTION_NAME");
  2. const JOB = JSON.parse(core.getInput("JOB", { required: true }));
  3. const SLACK_WEBHOOK_URL = core.getInput("SLACK_WEBHOOK_URL", {
  4. required: true
  5. });
  6. const message = new Inco…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants