GitHub Actions Workflow
To run an action graph on GitHub, you need a GitHub Actions workflow YAML file that invokes the actionforge/action action. This action reads your .act graph file and executes it on the GitHub runner.
Create the workflow file
Section titled “Create the workflow file”Create a YAML file in .github/workflows/ and save your .act graph file in .github/workflows/graphs/:
Directory.github/
Directoryworkflows/
- my-workflow.yml workflow YAML
Directorygraphs/
- my-workflow.act action graph
For example, my-workflow.yml:
name: Run Graph
on: push:
jobs: run-graph: runs-on: ubuntu-latest name: Run Graph steps: - name: Run Graph uses: actionforge/action@866e7df1ce5e84a2b32fda7414812ae72000dae8 # v0.14.6 with: graph-file: .github/workflows/graphs/my-workflow.act
inputs: ${{ toJson(inputs) }} secrets: ${{ toJson(secrets) }} matrix: ${{ toJson(matrix) }} needs: ${{ toJson(needs) }}The on: trigger in this YAML file should match the events you connected in your graph. For example, if your graph uses the on_push output of the GitHub Actions Start node, use on: push in the workflow file.
Push to GitHub
Section titled “Push to GitHub”Commit both the .act graph file and the .yml workflow file, then push:
git add .github/workflows/graphs/my-workflow.act .github/workflows/my-workflow.ymlgit commit -m "Add action graph workflow"git pushGitHub will automatically pick up the workflow and run it on the next matching event.