import { Job } from "https://deno.land/x/actionify@0.2.0/versions/0.ts";
The location and version of a reusable workflow file to run as a job. Use one of the following syntaxes:
- {owner}/{repo}/.github/workflows/{filename}@{ref} for reusable workflows in public repositories.
- ./.github/workflows/{filename} for reusable workflows in the same repository. {ref} can be a SHA, a release tag, or a branch name. Using the commit SHA is the safest for stability and security. For more information, see "Security hardening for GitHub Actions." If you use the second syntax option (without {owner}/{repo} and @{ref}) the called workflow is from the same commit as the caller workflow.
import { Workflow } from 'https://deno.land/x/actionify@0.1.0/mod.ts';
const workflow = Workflow
.create({ name: 'ci' })
.job('call-workflow-1-in-local-repo', (job) => {
return job
.uses('octo-org/this-repo/.github/workflows/workflow-1.yml@172239021f7ba04fe7327647b213799853a9eb89')
})
.job('call-workflow-2-in-local-repo', (job) => {
return job.uses('./.github/workflows/workflow-2.yml')
})
.job('call-workflow-in-another-repo', (job) => {
return job.uses('octo-org/another-repo/.github/workflows/workflow.yml@v1')
});
For more information, see "Reusing workflows."