You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Need to find a way to automate either notifications or PR's to update the workshop with each subsequent release of FESTIM.
Copilot suggests:
Yes, you can trigger a workflow in repository A whenever a release is made in repository B using GitHub Actions and repository dispatch events. Here’s a step-by-step guide:
1. Create a Personal Access Token (PAT):
Go to your GitHub settings.
Navigate to "Developer settings" > "Personal access tokens".
Generate a new token with repo scope.
2. Set up a workflow in repository B to trigger repository dispatch:
Create a new workflow file in repository B (e.g., .github/workflows/dispatch.yml).
name: Dispatch to Repo A
on:
release:
types: [published]
jobs:
dispatch:
runs-on: ubuntu-latest
steps:
- name: Trigger repository dispatch
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.PAT }}
repository: user/repoA
event-type: release-trigger
3. Add the PAT as a secret in repository B:
Go to the settings of repository B.
Navigate to "Secrets and variables" > "Actions".
Add a new secret named PAT with the value of the PAT you generated.
4. Create a workflow in repository A to respond to the dispatch event:
Create a new workflow file in repository A (e.g., .github/workflows/on-dispatch.yml).
name: On Dispatch Event
on:
repository_dispatch:
types: [release-trigger]
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Add your steps here
- name: Run a script
run: echo "Release made in repository B"
In this setup:
The workflow in repository B triggers a repository dispatch event to repository A whenever a release is published.
The workflow in repository A listens for the repository_dispatch event with the type release-trigger and runs the specified jobs.
Make sure to replace user/repo A with the actual owner and repository name of repository A.
Alternatively, we could use a program called Dependabot
Eitherway, its something to consider both here and for the V&V book
The text was updated successfully, but these errors were encountered:
Need to find a way to automate either notifications or PR's to update the workshop with each subsequent release of FESTIM.
Copilot suggests:
Yes, you can trigger a workflow in repository A whenever a release is made in repository B using GitHub Actions and repository dispatch events. Here’s a step-by-step guide:
1. Create a Personal Access Token (PAT):
2. Set up a workflow in repository B to trigger repository dispatch:
3. Add the PAT as a secret in repository B:
4. Create a workflow in repository A to respond to the dispatch event:
In this setup:
Make sure to replace user/repo A with the actual owner and repository name of repository A.
Alternatively, we could use a program called Dependabot
Eitherway, its something to consider both here and for the V&V book
The text was updated successfully, but these errors were encountered: