Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger build on template repo #7

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
40 changes: 40 additions & 0 deletions .github/workflows/trigger-template-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: trigger-template-build
on:
pull_request:

# jobs:
# get-code:
# runs-on: ubuntu-latest
# defaults:
# run:
# shell: bash -l {0}
# steps:
# - name: Checkout template repo
# uses: actions/checkout@v3
# with:
# repository: ProjectPythiaCookbooks/cookbook-template

# build:
# needs: get-code
# uses: ./.github/workflows/build-book.yaml
# with:
# environment_name: cookbook-dev
# environment_file: environment.yml
# path_to_notebooks: ./
# use_cached_environment: 'true' # This is default, not strickly needed. Set to 'false' to always build a new environment

jobs:
test-template:
runs-on: ubuntu-latest
steps:
- name: Create workflow dispatch to CookbookTemplate repo
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'ProjectPythiaCookbooks',
repo: 'cookbook-template',
workflow_id: 'nightly-build.yaml',
ref: 'main'
})