Skip to content

chore: separate main and release images #627

chore: separate main and release images

chore: separate main and release images #627

# This workflow is responsible for all kinds of integration tests run on pull request.
# Those tests depend on a container image so in the first job we wait for the image build to succeed.
name: PR Build and Push Manager Image
on:
# pull_request_target runs workflows from the base of PR
# It allows the workflow to get the repository secrets
pull_request_target:
types: [ synchronize, opened, reopened, ready_for_review ]
paths-ignore:
- "docs/**"
- "**/*.md"
- "tests/performance/**"
- "OWNERS"
- "CODEOWNERS"
- ".github/**" #Ignoring since build job isn't triggered on the workflow directory changes
- "external-images.yaml"
branches:
- 'main'
jobs:
build-image:
name: Build and push manager image
environment: ${{ github.event.pull_request.author_association != 'COLLABORATOR' && github.event.pull_request.author_association != 'OWNER' && 'restricted' || 'internal' }}
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.draft == false }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: ./.github/actions/build-manager-image
with:
operator-image-name: "europe-central2-docker.pkg.dev/sap-se-cx-kyma-goat/api-gateway/api-gateway-manager:PR-${{github.event.number}}"
push-image: 'true'
push-sa-key: ${{ secrets.GCP_SA_KEY }}