chore: Remove unnecesary qs and crypto-js packages from override #1913
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Busola Backend Build | |
| on: | |
| workflow_call: | |
| inputs: | |
| tag: | |
| description: 'Additional tag for built images' | |
| required: true | |
| type: string | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - '.github/workflows/busola-backend-build.yml' | |
| - 'backend/**' | |
| - 'package.json' | |
| pull_request_target: | |
| types: [opened, edited, synchronize, reopened, ready_for_review] | |
| paths: | |
| - '.github/workflows/busola-backend-build.yml' | |
| - 'backend/**' | |
| - 'package.json' | |
| permissions: | |
| id-token: write # This is required for requesting the JWT token | |
| contents: read # This is required for actions/checkout | |
| jobs: | |
| build-backend-image: | |
| uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main | |
| if: github.event.pull_request.draft == false | |
| with: | |
| name: busola-backend | |
| dockerfile: Dockerfile | |
| context: backend | |
| tags: ${{ inputs.tag != '' && inputs.tag || 'latest' }} | |
| extract-image-tag: | |
| name: Extract image tag | |
| runs-on: ubuntu-latest | |
| needs: build-backend-image | |
| outputs: | |
| image_tag: ${{ steps.extract_tag.outputs.image_tag }} | |
| steps: | |
| - name: Extract tag from built images | |
| id: extract_tag | |
| shell: bash | |
| run: | | |
| images='${{ needs.build-backend-image.outputs.images }}' | |
| tag=$(echo "$images" | jq -r '.[]' | grep -v ':latest' | awk -F: '{print $NF}' | head -n1) | |
| echo "image_tag=$tag" >> $GITHUB_OUTPUT | |
| open-pr-for-dev-deploy: | |
| name: Open PR for dev deploy | |
| runs-on: ubuntu-latest | |
| needs: [build-backend-image, extract-image-tag] | |
| # open PR only if the image tag starts with 'v20' ensuring only commit tags sent to dev | |
| if: startsWith(needs.extract-image-tag.outputs.image_tag, 'v20') | |
| steps: | |
| - name: Checkout busola-deploy repo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: kyma/busola-deploy | |
| github-server-url: 'https://github.tools.sap' | |
| ref: dev | |
| token: ${{ secrets.BUSOLA_DEPLOY_PAT }} | |
| - name: Update busola_backend_image version in dev/main.tf | |
| shell: bash | |
| run: | | |
| sed -i -E 's|(busola_backend_image \s*=\s*".*:)[^"]+|\1${{ needs.extract-image-tag.outputs.image_tag }}|' dev/main.tf | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| token: ${{ secrets.BUSOLA_DEPLOY_PAT }} | |
| commit-message: 'chore: pr deploy busola image to ${{ needs.extract-image-tag.outputs.image_tag }}' | |
| branch: pr-deploy-busola-image-${{ needs.extract-image-tag.outputs.image_tag }} | |
| title: 'chore: pr deploy busola image to ${{ needs.extract-image-tag.outputs.image_tag }}' | |
| labels: pr-deploy | |
| body: | | |
| This PR updates the Busola image version in dev/main.tf to ${{ needs.extract-image-tag.outputs.image_tag }}. | |
| base: dev |