Bump testcontainers to 2.0.2
#1010
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: Build uber jar | |
| on: | |
| release: | |
| types: [created] | |
| push: | |
| branches: | |
| - main | |
| - release-* | |
| pull_request: | |
| branches: | |
| - main | |
| - release-* | |
| jobs: | |
| uber-jar: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| packages: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '11' | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v2 | |
| - name: Generate settings.xml | |
| run: | | |
| mkdir -p ~/.m2 | |
| echo "<settings> | |
| <servers> | |
| <server> | |
| <id>github</id> | |
| <username>${{ github.actor }}</username> | |
| <password>${{ secrets.GITHUB_TOKEN }}</password> | |
| </server> | |
| </servers> | |
| </settings>" > ~/.m2/settings.xml | |
| - name: Download dependencies | |
| run: | | |
| mvn -B org.apache.maven.plugins:maven-dependency-plugin:3.8.1:go-offline de.qaware.maven:go-offline-maven-plugin:1.2.8:resolve-dependencies | |
| mvn -B -f flink-sql-runner/pom.xml org.apache.maven.plugins:maven-resources-plugin:3.3.1:resources | |
| grep '^FROM' flink-sql-runner/target/Dockerfile | awk '{print $2}' | xargs -n1 docker pull | |
| - name: Get project version and Flink version | |
| run: | | |
| if [[ "${{ github.event_name }}" == "release" && "${{ github.event.action }}" == "created" ]]; then | |
| echo "PROJECT_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV | |
| else | |
| echo "PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV | |
| fi | |
| echo "FLINK_VERSION_LABEL=$(mvn help:evaluate -Dexpression=flink.version.label -q -DforceStdout)" >> $GITHUB_ENV | |
| - name: Update version | |
| if: github.event_name == 'release' && github.event.action == 'created' | |
| run: | | |
| mvn -B versions:set -DnewVersion=${{ env.PROJECT_VERSION }} | |
| - name: Run Maven Build | |
| run: | | |
| mvn -B clean install | |
| - name: Define Docker image tag | |
| id: vars | |
| run: | | |
| if [[ "${{ github.event_name }}" == "release" && "${{ github.event.action }}" == "created" ]]; then | |
| echo "image_tag=datasqrl/flink-sql-runner:${{ env.PROJECT_VERSION }}-${{ env.FLINK_VERSION_LABEL }}" >> $GITHUB_OUTPUT | |
| elif [[ "${{ github.event_name }}" == "push" ]]; then | |
| echo "image_tag=ghcr.io/datasqrl/flink-sql-runner:${{ env.PROJECT_VERSION }}" >> $GITHUB_OUTPUT | |
| else | |
| echo "image_tag=ghcr.io/datasqrl/flink-sql-runner:pr-${{ github.event.number }}" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Log in to container registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ (github.event_name == 'release' && github.event.action == 'created') && 'docker.io' || 'ghcr.io' }} | |
| username: ${{ (github.event_name == 'release' && github.event.action == 'created') && secrets.DOCKER_USERNAME || github.actor }} | |
| password: ${{ (github.event_name == 'release' && github.event.action == 'created') && secrets.DOCKER_PASSWORD || secrets.GITHUB_TOKEN }} | |
| - name: Build and push Docker image (linux/amd64 + linux/arm64) | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: ./flink-sql-runner/target | |
| file: ./flink-sql-runner/target/Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: ${{ steps.vars.outputs.image_tag }} | |
| - name: Rename jar file | |
| if: github.event_name == 'release' && github.event.action == 'created' | |
| run: | | |
| mv flink-sql-runner/target/flink-sql-runner.uber.jar flink-sql-runner/target/flink-sql-runner-${{ env.PROJECT_VERSION }}-${{ env.FLINK_VERSION_LABEL }}.jar | |
| - name: Upload to GitHub Release | |
| if: github.event_name == 'release' && github.event.action == 'created' | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: flink-sql-runner/target/flink-sql-runner-${{ env.PROJECT_VERSION }}-${{ env.FLINK_VERSION_LABEL }}.jar | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |