From ca2c4a36841f28c98ac1e0f2e706d63fc92c6fd0 Mon Sep 17 00:00:00 2001 From: Muhammad Faizan Date: Mon, 16 Sep 2024 10:51:16 +0200 Subject: [PATCH] fix: moved build jobs to correct dir (#168) * moved build jobs to correct dir * removed test job in build image --- .github/pull-build-image.yaml | 35 ------------------- .github/workflows/pull-build-image.yaml | 18 ++++++++++ .github/{ => workflows}/push-build-image.yaml | 0 .github/{ => workflows}/tag-build-image.yaml | 0 4 files changed, 18 insertions(+), 35 deletions(-) delete mode 100644 .github/pull-build-image.yaml create mode 100644 .github/workflows/pull-build-image.yaml rename .github/{ => workflows}/push-build-image.yaml (100%) rename .github/{ => workflows}/tag-build-image.yaml (100%) diff --git a/.github/pull-build-image.yaml b/.github/pull-build-image.yaml deleted file mode 100644 index ceaf2c0..0000000 --- a/.github/pull-build-image.yaml +++ /dev/null @@ -1,35 +0,0 @@ -name: Pull Build Image - -on: - pull_request_target: - types: [opened, edited, synchronize, reopened, ready_for_review] - -permissions: - id-token: write # This is required for requesting the JWT token - contents: read # This is required for actions/checkout - -jobs: - build: - uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main - with: - name: eventing-publisher-proxy - dockerfile: Dockerfile - context: . - export-tags: true - test-image: - runs-on: ubuntu-latest - needs: build - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install jq - run: sudo apt-get install jq - - - name: Extract image name from JSON - id: extract-image - run: | - echo "IMAGE_NAME=$(echo '${{ needs.build.outputs.images }}' | jq -r '.[0]')" >> $GITHUB_ENV - - - name: Test image - run: ./scripts/shell/run-and-check-container.sh "$IMAGE_NAME" PR-${{ github.event.number }}-container diff --git a/.github/workflows/pull-build-image.yaml b/.github/workflows/pull-build-image.yaml new file mode 100644 index 0000000..1356e19 --- /dev/null +++ b/.github/workflows/pull-build-image.yaml @@ -0,0 +1,18 @@ +name: Pull Build Image + +on: + pull_request_target: + types: [opened, edited, synchronize, reopened, ready_for_review] + +permissions: + id-token: write # This is required for requesting the JWT token + contents: read # This is required for actions/checkout + +jobs: + build: + uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main + with: + name: eventing-publisher-proxy + dockerfile: Dockerfile + context: . + export-tags: true diff --git a/.github/push-build-image.yaml b/.github/workflows/push-build-image.yaml similarity index 100% rename from .github/push-build-image.yaml rename to .github/workflows/push-build-image.yaml diff --git a/.github/tag-build-image.yaml b/.github/workflows/tag-build-image.yaml similarity index 100% rename from .github/tag-build-image.yaml rename to .github/workflows/tag-build-image.yaml