Skip to content

Create Upgrade jobs for PR and main merge #13

Create Upgrade jobs for PR and main merge

Create Upgrade jobs for PR and main merge #13

name: post-e2e-upgrade-test
on:
pull_request:
branches: [ "main" ]
paths-ignore:
- 'docs/**'
- '**.md'
- 'sec-scanners-config.yaml'
jobs:
get-latest-release:
runs-on: ubuntu-latest
outputs:
latest_release_tag: ${{ steps.get-latest-release-tag.outputs.latest_release_tag }}
steps:
- name: Checkout
uses: actions/checkout@v2
# checkout the current branch
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Get latest release tag
id: get-latest-release-tag
run: |
latest_rel_tag=$(curl -s https://api.github.com/repos/kyma-project/eventing-manager/releases/latest | jq -r '.tag_name')
echo "Output [$latest_rel_tag]"
echo "latest_release_tag=$latest_rel_tag" >> "$GITHUB_OUTPUT"
second_job:
needs: get-latest-release
runs-on: ubuntu-latest
steps:
- name: Print latest release tag
run: echo "latest_release_tag=${{ needs.get-latest-release.outputs.latest_release_tag }}"
upgrade-test:
uses: ./.github/workflows/run-upgrade-tests-reusable.yaml
needs: get-latest-release
with:
pre-upgrade-image: europe-docker.pkg.dev/kyma-project/prod/eventing-manager:${{ needs.get-latest-release.outputs.latest_release_tag }}
post-upgrade-image: europe-docker.pkg.dev/kyma-project/dev/eventing-manager:main
pre-upgrade-branch: ${{ needs.get-latest-release.outputs.latest_release_tag }}
post-upgrade-branch: main
build-job-name: pull-eventing-manager-build
commit-sha: ${{ github.event.pull_request.head.sha }}
secrets: inherit