From 616f42d19ae3f5155666af38986ce4f56baaa1c4 Mon Sep 17 00:00:00 2001 From: Mirko Mollik Date: Thu, 8 Aug 2024 08:54:59 +0200 Subject: [PATCH] update ci Signed-off-by: Mirko Mollik --- .github/workflows/cd.yml | 2 +- .github/workflows/ci.yml | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index d5585cad..7cdbce40 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -43,7 +43,7 @@ jobs: # build the docker image for keycloak - name: Build Keycloak Docker Image - run: cd deploys/keycloak && docker-compose build keycloak && docker-compose push keycloak + run: cd deploys/keycloak && docker compose build keycloak && docker compose push keycloak # add the release, build the container and release it with the information for sentry - name: Build and push images diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f111f6f..eba7d0bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,7 @@ jobs: run: npx playwright install --with-deps - name: Build keycloak - run: cd deploys/keycloak && docker-compose build keycloak + run: cd deploys/keycloak && docker compose build keycloak - name: Add entry to /etc/hosts run: echo "127.0.0.1 host.testcontainers.internal" | sudo tee -a /etc/hosts @@ -56,17 +56,26 @@ jobs: # token: ${{ secrets.CODECOV_TOKEN }} - name: Upload playwright results - if: always() + if: always() && steps.check_playwright_results.outputs.exists == 'true' uses: actions/upload-artifact@v4 with: name: playwright-results path: dist/.playwright retention-days: 30 + - name: Check if playwright results exist + id: check_playwright_results + run: echo "exists=$(if [ -d dist/.playwright ]; then echo true; else echo false; fi)" >> $GITHUB_ENV + + - name: Upload testcontainer logs - if: always() + if: always() && steps.check_testcontainer_logs.outputs.exists == 'true' uses: actions/upload-artifact@v4 with: name: testcontainer-logs path: tmp/logs retention-days: 30 + + - name: Check if testcontainer logs exist + id: check_testcontainer_logs + run: echo "exists=$(if [ -d tmp/logs ]; then echo true; else echo false; fi)" >> $GITHUB_ENV