Skip to content

use reusable workflows in create-release workflow. #125

use reusable workflows in create-release workflow.

use reusable workflows in create-release workflow. #125

Workflow file for this run

name: pull-target-e2e
## NOTE: This workflow uses the GitHub event `pull_request_target`, which uses the base commit instead of the head.
# Therefore, the source used for the e2e tests and `make deploy` will be from base, rather than the pull request.
# Reference(s):
# - https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target/
# - https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
on:
pull_request_target:
branches:
- main
- "release-**"
paths-ignore:
- "docs/**"
- "**.md"
- "sec-scanners-config.yaml"
jobs:
is-pr-approved:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check if PR approved
env:
GH_TOKEN: ${{ github.token }}
PR_URL: https://github.com/kyma-project/eventing-manager/pull/${{ github.event.number }}
run: |
./scripts/is_pr_approved.sh
wait-until-build-succeeds:
runs-on: ubuntu-latest
needs: is-pr-approved
steps:
- name: Wait for the 'pull-eventing-manager-build' job to succeed
id: pull-wait-build
uses: kyma-project/wait-for-commit-status-action@2b3ffe09af8b6f40e1213d5fb7f91a7bd41ffb20
with:
context: "pull-eventing-manager-build"
commit_ref: "${{ github.event.pull_request.head.sha }}" # Note: 'github.event.pull_request.head.sha' is not same as 'github.sha' on pull requests.
timeout: 600000 # 10 minutes in milliseconds
# The check interval is kept long otherwise it will exhaust the GitHub rate limit (More info: https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#rate-limiting)
check_interval: 60000 # 1 minute in milliseconds
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GITHUB_OWNER: "${{ github.repository_owner }}"
GITHUB_REPO: "eventing-manager"
backend-switching:
needs: wait-until-build-succeeds
uses: "./.github/workflows/e2e-backend-switching-reuseable.yml"
with:
eventing-manager-image: europe-docker.pkg.dev/kyma-project/dev/eventing-manager:PR-${{ github.event.number }}
cluster-name-prefix: "ghem-"
secrets: inherit