Cleanup build and deploy actions #728
Workflow file for this run
This file contains 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 and test | |
on: | |
pull_request: | |
workflow_dispatch: | |
env: | |
DISTRIBUTION: temurin | |
JVM_TYPE: jre | |
JVM_VERSION: 17 | |
REGISTRY: ghcr.io | |
jobs: | |
build-vars: | |
name: Create build variables | |
runs-on: ubuntu-latest | |
outputs: | |
distribution: ${{ steps.build-vars.outputs.distribution }} | |
jvm-type: ${{ steps.build-vars.outputs.jvm-type }} | |
jvm-version: ${{ steps.build-vars.outputs.jvm-version }} | |
registry: ${{ steps.build-vars.outputs.registry }} | |
steps: | |
- id: build-vars | |
name: Create build variables | |
run: | | |
echo "distribution=$DISTRIBUTION" >> $GITHUB_OUTPUT | |
echo "jvm-type=$JVM_TYPE" >> $GITHUB_OUTPUT | |
echo "jvm-version=$JVM_VERSION" >> $GITHUB_OUTPUT | |
echo "registry=$REGISTRY" >> $GITHUB_OUTPUT | |
sha-tag: | |
name: Create sha docker tag | |
uses: ./.github/workflows/create-sha-docker-tag.yml | |
needs: build-vars | |
with: | |
jvm-type: ${{ needs.build-vars.outputs.jvm-type }} | |
jvm-version: ${{ needs.build-vars.outputs.jvm-version }} | |
build-and-deploy: | |
name: Build and deploy OCI image | |
uses: ./.github/workflows/build-and-deploy-image.yml | |
needs: | |
- build-vars | |
- sha-tag | |
with: | |
image-name: ${{ github.repository }}:${{ needs.sha-tag.outputs.tag }} | |
registry: ${{ needs.build-vars.outputs.registry }} | |
integration-test: | |
name: Verify OCI image with ${{ matrix.backend }} | |
needs: | |
- build-vars | |
- build-and-deploy | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
backend: [ | |
aws-param-store, | |
aws-s3, | |
aws-secrets-manager, | |
cloud-bus-kafka, | |
cloud-bus-rabbitmq, | |
git, | |
mariadb, | |
native, | |
postgres, | |
prometheus, | |
redis, | |
security, | |
vault | |
] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK ${{ needs.build-vars.outputs.jvm-version }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: ${{ needs.build-vars.outputs.distribution }} | |
java-version: ${{ needs.build-vars.outputs.jvm-version }} | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Test with ${{ matrix.backend }} | |
run: > | |
./gradlew test -i | |
-PtestFilter=${{ matrix.backend }} | |
-PimageRegistry=${{ needs.build-vars.outputs.registry }} | |
-PjdkVersion=${{ needs.build-vars.outputs.jvm-version }} | |
-PimageTag=${{ needs.sha-tag.outputs.tag }} |