Update copy-script script to copy generated allure test reports #248
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: Build | |
| on: | |
| push: | |
| branches: [ "main", "releases-**" ] | |
| tags: [ "[0-9]+.[0-9]+.[0-9]+" ] | |
| pull_request: | |
| types: [ opened, synchronize, reopened ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Set up Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| id: buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build with Maven | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: mvn -B clean verify -Pcoverage | |
| - name: Test Image Build | |
| if: github.event_name == 'pull_request' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64 | |
| push: false | |
| file: Dockerfile | |
| - name: Login to Quay | |
| if: github.event_name == 'push' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: "${{ secrets.IMAGE_REPO_HOSTNAME }}" | |
| username: "${{ secrets.IMAGE_REPO_USERNAME }}" | |
| password: "${{ secrets.IMAGE_REPO_PASSWORD }}" | |
| - name: Image metadata | |
| if: github.event_name == 'push' | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: | | |
| ${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/flink-sql-runner | |
| tags: | | |
| type=ref,event=branch | |
| type=ref,event=tag | |
| flavor: | | |
| latest=false | |
| prefix= | |
| suffix= | |
| - name: Build and Push Image | |
| if: github.event_name == 'push' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| file: Dockerfile | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| ## Save the context information for use in Sonar analysis | |
| - name: Save Build Context | |
| run: | | |
| mkdir -vp target | |
| echo "$GITHUB_CONTEXT" > target/build-context.json | |
| env: | |
| GITHUB_CONTEXT: ${{ toJson(github) }} | |
| ## Attach the target directory for use in Sonar analysis | |
| - name: Attach Build Output | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: target | |
| path: | | |
| **/target/ | |
| !flink-sql-runner-dist/** | |
| !**/target/**.jar | |
| !**/target/failsafe-reports/**/* | |
| !**/target/surefire-reports/**/* |