diff --git a/.github/workflows/wipac_cicd.yaml b/.github/workflows/wipac_cicd.yaml index e6e09dd..e28a2de 100644 --- a/.github/workflows/wipac_cicd.yaml +++ b/.github/workflows/wipac_cicd.yaml @@ -9,6 +9,35 @@ on: jobs: + keycloak-image-build: + runs-on: ubuntu-latest + outputs: + keycloak-tag: ${{ steps.docker_meta.outputs.tags }} + steps: + - uses: actions/checkout@v3 + - name: Docker meta + id: docker_meta + uses: docker/metadata-action@v4 + with: + images: | + ghcr.io/WIPACRepo/keycloak-rest-services + tags: | + type=ref,prefix=test-keycloak-,event=branch + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Push Docker Image + uses: docker/build-push-action@v4 + with: + context: . + file: resources/keycloak-image/Dockerfile + push: true + tags: ${{ steps.docker_meta.outputs.tags }} + labels: ${{ steps.docker_meta.outputs.labels }} + flake8: needs: [] runs-on: ubuntu-latest @@ -54,17 +83,16 @@ jobs: pip install . py-tests: - needs: [py-versions] + needs: [py-versions, keycloak-image-build] runs-on: ubuntu-latest services: keycloak: - image: quay.io/keycloak/keycloak:24.0.2 + image: ${{ needs.keycloak-image-build.outputs.keycloak-tag }} env: KEYCLOAK_ADMIN: admin KEYCLOAK_ADMIN_PASSWORD: admin - KC_HTTP_ENABLED: true - KC_HTTP_RELATIVE_PATH: /auth - options: start-dev + KK_TO_RMQ_URL: rabbitmq + CMD: start-dev ports: - 8080:8080 mongo: