diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6a6c638..d3df9ce 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,12 +12,14 @@ jobs: steps: - id: checkout name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - - name: Install Java and Maven - uses: actions/setup-java@v1 + - id: java + name: Install Java and Maven + uses: actions/setup-java@v2 with: - java-version: 8 + distribution: zulu + java-version: 11 - id: vars name: Get project variables @@ -36,10 +38,11 @@ jobs: mvn -B test package - name: Upload artifact - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: jar path: target/${{ steps.vars.outputs.artifactId }}-${{ steps.vars.outputs.projectVersion }}.jar + if-no-files-found: error outputs: artifact_id: ${{ steps.vars.outputs.artifactId }} @@ -51,16 +54,6 @@ jobs: name: Test runs-on: ubuntu-latest needs: build - services: - keycloak: - image: quay.io/keycloak/keycloak:${{ needs.build.outputs.keycloak_version }} - env: - KEYCLOAK_USER: admin - KEYCLOAK_PASSWORD: admin - ports: - - 8080:8080 - volumes: - - '${{ github.workspace }}:/workspace' steps: - id: checkout name: Checkout code @@ -68,37 +61,42 @@ jobs: - id: download_artifact name: Download artifact - uses: actions/download-artifact@v1 + uses: actions/download-artifact@v3 with: name: jar + - id: create_container + name: Create Keycloak container + run: | + docker run -i -t -d -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin -p 8080:8080 --name keycloak "quay.io/keycloak/keycloak:${{ needs.build.outputs.keycloak_version }}" start-dev + - id: deploy name: Deploy artifact run: | - CONTAINER="${{ job.services.keycloak.id }}" + CONTAINER="keycloak" NAME="${{ needs.build.outputs.artifact_id }}-${{ needs.build.outputs.project_version }}.jar" - FILE="/opt/jboss/keycloak/standalone/deployments/${NAME}" - docker cp "jar/${NAME}" "${CONTAINER}:/tmp/" - docker exec -i "${CONTAINER}" /bin/bash <org.keycloak keycloak-protocol-cas - 16.1.1 + 17.0.0 Keycloak CAS Protocol ${project.version} - 3.4.1.Final + 3.4.3.Final 2.2.1.Final 4.13.2