Open c-pius opened 5 months ago
I have clarified with the SREs with the following output:
management-plane-charts
will be deployed until a new version arrives. That could be another pr-dev, or a normal version bumpDeprioritized this as it is not a current pain point. We can look at it later again if we find that automatic deployments to DEV ease our dev process.
To trigger a GitHub Actions workflow in Repository B when a commit is pushed to Repository A, you'll need to use a combination of GitHub Webhooks and a personal access token (PAT) to trigger the workflow in the second repository. Here's how you can do it:
https://api.github.com/repos/<owner>/<repository>/dispatches
Replace <owner>
and <repository>
with the appropriate values for Repository B.
application/json
.repo
scope, which allows access to public and private repositories.In Repository A, create or update your GitHub Actions workflow file (.github/workflows/trigger-repo-b.yml
).
Example workflow file:
name: Trigger Repository B Workflow
on:
push:
branches:
- main # Adjust the branch as needed
jobs:
trigger-workflow:
runs-on: ubuntu-latest
steps:
- name: Trigger Repository B workflow
run: |
curl -X POST \
-H "Authorization: token ${{ secrets.PERSONAL_ACCESS_TOKEN }}" \
-H "Accept: application/vnd.github.everest-preview+json" \
https://api.github.com/repos/<owner>/<repository>/dispatches \
-d '{"event_type": "trigger_workflow"}'
env:
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
<owner>
and <repository>
with the values for Repository B.PERSONAL_ACCESS_TOKEN
in Repository A.In Repository B, create a GitHub Actions workflow file that gets triggered by the external event from Repository A.
Example workflow file (.github/workflows/on-dispatch.yml
):
name: On Dispatch Event
on:
repository_dispatch:
types: [trigger_workflow]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository B
uses: actions/checkout@v2
- name: Run some action in Repository B
run: echo "This is triggered by a push in Repository A"
repository_dispatch
event and runs its workflow.This setup ensures that a push in Repository A triggers a workflow in Repository B.
We have adapted our current release process timeline. We need to check if this already solves our release process problems. Until then, this ticket can be parked.
Description
:exclamation: FIRST verify with SRE that the concept below can be achieved.
Create a permanent
pr-deploy
branch and PR in management-plane-charts repository. Every time we merge a commit onlifecycle-manager:main
, we want the branch/PR to be updated automatically with the new commit hash so that the changes are deployed continuously for testing.Acceptance Criteria
charts/lifecycle-manager
branchlifecycle-manager:main
lifecycle-manager:main
)charts/lifecycle-manager
)Reason
We want to have our changes to
lifecacle-manager:main
continuously deployed to DEV for testing