Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions execute-workflow/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ runs:
steps:
- name: Execute workflow
uses: actions/github-script@v8
env:
WORKFLOW: ${{ inputs.workflow }}
INPUTS: ${{ inputs.inputs }}
with:
github-token: ${{ inputs.token }}
script: |
Expand All @@ -27,4 +30,5 @@ runs:
github,
context,
core,
env: process.env,
});
6 changes: 3 additions & 3 deletions execute-workflow/index.mts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ type WorkflowRun = {
html_url: string;
};

export async function main({ github, context, core }: { github: Octokit, context: typeof Context, core: typeof Core }) {
export async function main({ github, context, core, env }: { github: Octokit, context: typeof Context, core: typeof Core, env: Record<string, string | undefined> }) {
core.info(`🏃 Execute Workflow Action v${PackageJSON.version}`);
try {
const workflowFileName = core.getInput('workflow');
const workflowFileName = env.WORKFLOW ?? '';

const inputsJson = core.getInput('inputs');
const inputsJson = env.INPUTS ?? '';
const inputs = inputsJson ? JSON.parse(inputsJson) : {};

const { owner, repo } = context.repo;
Expand Down
10 changes: 10 additions & 0 deletions wait-for-checks/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ runs:
steps:
- name: Wait for checks
uses: actions/github-script@v8
env:
CHECK_NAME: ${{ inputs.check-name }}
CHECK_REGEXP: ${{ inputs.check-regexp }}
REF: ${{ inputs.ref }}
WAIT_INTERVAL: ${{ inputs.wait-interval }}
RUNNING_WORKFLOW_NAME: ${{ inputs.running-workflow-name }}
ALLOWED_CONCLUSIONS: ${{ inputs.allowed-conclusions }}
IGNORE_CHECKS: ${{ inputs.ignore-checks }}
VERBOSE: ${{ inputs.verbose }}
with:
github-token: ${{ inputs.token }}
script: |
Expand All @@ -52,4 +61,5 @@ runs:
github,
context,
core,
env: process.env,
});
18 changes: 9 additions & 9 deletions wait-for-checks/index.mts
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,17 @@ async function findCommitWithoutSkipCI(
throw new Error(`Traversed ${MAX_PARENT_TRAVERSAL} commits without finding one without [skip ci]. Giving up.`);
}

export async function main({ github, context, core }: { github: Octokit; context: typeof Context; core: typeof Core }) {
export async function main({ github, context, core, env }: { github: Octokit; context: typeof Context; core: typeof Core; env: Record<string, string | undefined> }) {
core.info(`🔍 Wait for Checks Action v${PackageJSON.version}`);
try {
const checkName = core.getInput('check-name');
const checkRegexp = core.getInput('check-regexp');
const ref = core.getInput('ref');
const waitInterval = parseInt(core.getInput('wait-interval'), 10);
const runningWorkflowName = core.getInput('running-workflow-name');
const allowedConclusionsInput = core.getInput('allowed-conclusions');
const ignoreChecksInput = core.getInput('ignore-checks');
const verbose = core.getInput('verbose') === 'true';
const checkName = env.CHECK_NAME ?? '';
const checkRegexp = env.CHECK_REGEXP ?? '';
const ref = env.REF ?? '';
const waitInterval = parseInt(env.WAIT_INTERVAL ?? '10', 10);
const runningWorkflowName = env.RUNNING_WORKFLOW_NAME ?? '';
const allowedConclusionsInput = env.ALLOWED_CONCLUSIONS ?? '';
const ignoreChecksInput = env.IGNORE_CHECKS ?? '';
const verbose = (env.VERBOSE ?? '') === 'true';

const allowedConclusions = allowedConclusionsInput.split(',').map((c) => c.trim());
const ignoreChecks = ignoreChecksInput
Expand Down
Loading