From 7896b34c7e8989b03fed374299150b178f8f1af2 Mon Sep 17 00:00:00 2001 From: dtuchs Date: Wed, 13 Mar 2024 18:39:21 +0500 Subject: [PATCH 1/2] check e2e --- niffler-auth/build.gradle | 1 - niffler-userdata/build.gradle | 1 - 2 files changed, 2 deletions(-) diff --git a/niffler-auth/build.gradle b/niffler-auth/build.gradle index 0a878029..259fd6a2 100644 --- a/niffler-auth/build.gradle +++ b/niffler-auth/build.gradle @@ -57,4 +57,3 @@ tasks.register('printVersion') { tasks.named('test') { useJUnitPlatform() } - diff --git a/niffler-userdata/build.gradle b/niffler-userdata/build.gradle index e48d1c64..0fcd64c0 100644 --- a/niffler-userdata/build.gradle +++ b/niffler-userdata/build.gradle @@ -93,4 +93,3 @@ tasks.register('printVersion') { tasks.named('test') { useJUnitPlatform() } - From 9d955e6e3a19720f933338ab9e508af51cceaee7 Mon Sep 17 00:00:00 2001 From: dtuchs Date: Wed, 13 Mar 2024 19:03:49 +0500 Subject: [PATCH 2/2] added sha --- .github/workflows/niffler-auth-staging.yaml | 22 ++++++++++++++ .../workflows/niffler-currency-staging.yaml | 22 ++++++++++++++ .../niffler-frontend-gql-staging.yaml | 22 ++++++++++++++ .../workflows/niffler-frontend-staging.yaml | 22 ++++++++++++++ .../workflows/niffler-gateway-staging.yaml | 22 ++++++++++++++ .github/workflows/niffler-spend-staging.yaml | 22 ++++++++++++++ .../workflows/niffler-userdata-staging.yaml | 29 ++++++++++++++++++- 7 files changed, 160 insertions(+), 1 deletion(-) diff --git a/.github/workflows/niffler-auth-staging.yaml b/.github/workflows/niffler-auth-staging.yaml index db7692eb..70e0551d 100644 --- a/.github/workflows/niffler-auth-staging.yaml +++ b/.github/workflows/niffler-auth-staging.yaml @@ -26,6 +26,23 @@ jobs: runs-on: niffler-stage-runner needs: prepare steps: + # https://github.com/LouisBrunner/checks-action/issues/22#issuecomment-885047551 + - name: Recognize sha ref + - uses: actions/checkout@master + id: sharef + run: | + if [ "$EVENT" == 'pull_request' ] + then + echo "::set-output name=sha::$(echo ${{github.event.pull_request.head.sha}})" + elif [ "$EVENT" == 'workflow_run' ] + then + echo "::set-output name=sha::$(echo ${{github.event.workflow_run.head_sha}})" + else + echo "::set-output name=sha::$(echo $GITHUB_SHA)" + fi + env: + EVENT: ${{ github.event_name }} + REF: ${{ github.ref }} - name: Push required props to GITHUB_ENV run: | echo "PROFILE=staging" >> $GITHUB_ENV @@ -51,3 +68,8 @@ jobs: docker-compose -f docker-compose.ci.yml stop auth.niffler.dc && docker-compose -f docker-compose.ci.yml up -d --no-deps auth.niffler.dc docker system prune -a -f echo "Done!" + - name: Commit Action Status + uses: LouisBrunner/checks-action@v1.1.1 + with: + sha: ${{ steps.sharef.outputs.sha }} + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/niffler-currency-staging.yaml b/.github/workflows/niffler-currency-staging.yaml index 80c0cac9..cdb6fb78 100644 --- a/.github/workflows/niffler-currency-staging.yaml +++ b/.github/workflows/niffler-currency-staging.yaml @@ -26,6 +26,23 @@ jobs: runs-on: niffler-stage-runner needs: prepare steps: + # https://github.com/LouisBrunner/checks-action/issues/22#issuecomment-885047551 + - name: Recognize sha ref + - uses: actions/checkout@master + id: sharef + run: | + if [ "$EVENT" == 'pull_request' ] + then + echo "::set-output name=sha::$(echo ${{github.event.pull_request.head.sha}})" + elif [ "$EVENT" == 'workflow_run' ] + then + echo "::set-output name=sha::$(echo ${{github.event.workflow_run.head_sha}})" + else + echo "::set-output name=sha::$(echo $GITHUB_SHA)" + fi + env: + EVENT: ${{ github.event_name }} + REF: ${{ github.ref }} - name: Push required props to GITHUB_ENV run: | echo "PROFILE=staging" >> $GITHUB_ENV @@ -51,3 +68,8 @@ jobs: docker-compose -f docker-compose.ci.yml stop currency.niffler.dc && docker-compose -f docker-compose.ci.yml up -d --no-deps currency.niffler.dc docker system prune -a -f echo "Done!" + - name: Commit Action Status + uses: LouisBrunner/checks-action@v1.1.1 + with: + sha: ${{ steps.sharef.outputs.sha }} + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/niffler-frontend-gql-staging.yaml b/.github/workflows/niffler-frontend-gql-staging.yaml index acde2bda..7006f25c 100644 --- a/.github/workflows/niffler-frontend-gql-staging.yaml +++ b/.github/workflows/niffler-frontend-gql-staging.yaml @@ -26,6 +26,23 @@ jobs: runs-on: niffler-stage-runner needs: prepare steps: + # https://github.com/LouisBrunner/checks-action/issues/22#issuecomment-885047551 + - name: Recognize sha ref + - uses: actions/checkout@master + id: sharef + run: | + if [ "$EVENT" == 'pull_request' ] + then + echo "::set-output name=sha::$(echo ${{github.event.pull_request.head.sha}})" + elif [ "$EVENT" == 'workflow_run' ] + then + echo "::set-output name=sha::$(echo ${{github.event.workflow_run.head_sha}})" + else + echo "::set-output name=sha::$(echo $GITHUB_SHA)" + fi + env: + EVENT: ${{ github.event_name }} + REF: ${{ github.ref }} - name: Push required props to GITHUB_ENV run: | echo "PROFILE=staging" >> $GITHUB_ENV @@ -47,3 +64,8 @@ jobs: pwd echo "### niffler-front version will be used: ${{ env.PREFIX }}/${{ env.FRONT_IMAGE }}-${{ env.PROFILE }}:${{ env.FRONT_VER }}" bash ./docker-build.sh staging push + - name: Commit Action Status + uses: LouisBrunner/checks-action@v1.1.1 + with: + sha: ${{ steps.sharef.outputs.sha }} + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/niffler-frontend-staging.yaml b/.github/workflows/niffler-frontend-staging.yaml index 4445921e..e077fc3f 100644 --- a/.github/workflows/niffler-frontend-staging.yaml +++ b/.github/workflows/niffler-frontend-staging.yaml @@ -26,6 +26,23 @@ jobs: runs-on: niffler-stage-runner needs: prepare steps: + # https://github.com/LouisBrunner/checks-action/issues/22#issuecomment-885047551 + - name: Recognize sha ref + - uses: actions/checkout@master + id: sharef + run: | + if [ "$EVENT" == 'pull_request' ] + then + echo "::set-output name=sha::$(echo ${{github.event.pull_request.head.sha}})" + elif [ "$EVENT" == 'workflow_run' ] + then + echo "::set-output name=sha::$(echo ${{github.event.workflow_run.head_sha}})" + else + echo "::set-output name=sha::$(echo $GITHUB_SHA)" + fi + env: + EVENT: ${{ github.event_name }} + REF: ${{ github.ref }} - name: Push required props to GITHUB_ENV run: | echo "PROFILE=staging" >> $GITHUB_ENV @@ -53,3 +70,8 @@ jobs: docker-compose -f docker-compose.ci.yml stop frontend.niffler.dc && docker-compose -f docker-compose.ci.yml up -d --no-deps frontend.niffler.dc docker system prune -a -f echo "Done!" + - name: Commit Action Status + uses: LouisBrunner/checks-action@v1.1.1 + with: + sha: ${{ steps.sharef.outputs.sha }} + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/niffler-gateway-staging.yaml b/.github/workflows/niffler-gateway-staging.yaml index df05dedd..1567a44a 100644 --- a/.github/workflows/niffler-gateway-staging.yaml +++ b/.github/workflows/niffler-gateway-staging.yaml @@ -26,6 +26,23 @@ jobs: runs-on: niffler-stage-runner needs: prepare steps: + # https://github.com/LouisBrunner/checks-action/issues/22#issuecomment-885047551 + - name: Recognize sha ref + - uses: actions/checkout@master + id: sharef + run: | + if [ "$EVENT" == 'pull_request' ] + then + echo "::set-output name=sha::$(echo ${{github.event.pull_request.head.sha}})" + elif [ "$EVENT" == 'workflow_run' ] + then + echo "::set-output name=sha::$(echo ${{github.event.workflow_run.head_sha}})" + else + echo "::set-output name=sha::$(echo $GITHUB_SHA)" + fi + env: + EVENT: ${{ github.event_name }} + REF: ${{ github.ref }} - name: Push required props to GITHUB_ENV run: | echo "PROFILE=staging" >> $GITHUB_ENV @@ -51,3 +68,8 @@ jobs: docker-compose -f docker-compose.ci.yml stop gateway.niffler.dc && docker-compose -f docker-compose.ci.yml up -d --no-deps gateway.niffler.dc docker system prune -a -f echo "done!" + - name: Commit Action Status + uses: LouisBrunner/checks-action@v1.1.1 + with: + sha: ${{ steps.sharef.outputs.sha }} + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/niffler-spend-staging.yaml b/.github/workflows/niffler-spend-staging.yaml index ac198e62..7e083989 100644 --- a/.github/workflows/niffler-spend-staging.yaml +++ b/.github/workflows/niffler-spend-staging.yaml @@ -26,6 +26,23 @@ jobs: runs-on: niffler-stage-runner needs: prepare steps: + # https://github.com/LouisBrunner/checks-action/issues/22#issuecomment-885047551 + - name: Recognize sha ref + - uses: actions/checkout@master + id: sharef + run: | + if [ "$EVENT" == 'pull_request' ] + then + echo "::set-output name=sha::$(echo ${{github.event.pull_request.head.sha}})" + elif [ "$EVENT" == 'workflow_run' ] + then + echo "::set-output name=sha::$(echo ${{github.event.workflow_run.head_sha}})" + else + echo "::set-output name=sha::$(echo $GITHUB_SHA)" + fi + env: + EVENT: ${{ github.event_name }} + REF: ${{ github.ref }} - name: Push required props to GITHUB_ENV run: | echo "PROFILE=staging" >> $GITHUB_ENV @@ -51,3 +68,8 @@ jobs: docker-compose -f docker-compose.ci.yml stop spend.niffler.dc && docker-compose -f docker-compose.ci.yml up -d --no-deps spend.niffler.dc docker system prune -a -f echo "Done!" + - name: Commit Action Status + uses: LouisBrunner/checks-action@v1.1.1 + with: + sha: ${{ steps.sharef.outputs.sha }} + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/niffler-userdata-staging.yaml b/.github/workflows/niffler-userdata-staging.yaml index 7f38fe04..4c4cf8a2 100644 --- a/.github/workflows/niffler-userdata-staging.yaml +++ b/.github/workflows/niffler-userdata-staging.yaml @@ -12,7 +12,12 @@ jobs: steps: - name: debug run: | - echo "debug!" + echo "### github.event.workflow_run.event: ${{ github.event.workflow_run.event }}" + echo "### github.event.workflow_run.name: ${{ github.event.workflow_run.name }}" + echo "### github.event.workflow_run.conclusion: ${{ github.event.workflow_run.conclusion }}" + echo "### github.event_path: ${{ github.event_path }}" + echo "### github.event_path result: ${{ contains(github.event_path, 'niffler-userdata/') }}" + prepare: if: | @@ -33,6 +38,23 @@ jobs: runs-on: niffler-stage-runner needs: prepare steps: + # https://github.com/LouisBrunner/checks-action/issues/22#issuecomment-885047551 + - name: Recognize sha ref + - uses: actions/checkout@master + id: sharef + run: | + if [ "$EVENT" == 'pull_request' ] + then + echo "::set-output name=sha::$(echo ${{github.event.pull_request.head.sha}})" + elif [ "$EVENT" == 'workflow_run' ] + then + echo "::set-output name=sha::$(echo ${{github.event.workflow_run.head_sha}})" + else + echo "::set-output name=sha::$(echo $GITHUB_SHA)" + fi + env: + EVENT: ${{ github.event_name }} + REF: ${{ github.ref }} - name: Push required props to GITHUB_ENV run: | echo "PROFILE=staging" >> $GITHUB_ENV @@ -58,3 +80,8 @@ jobs: docker-compose -f docker-compose.ci.yml stop userdata.niffler.dc && docker-compose -f docker-compose.ci.yml up -d --no-deps userdata.niffler.dc docker system prune -a -f echo "Done!" + - name: Commit Action Status + uses: LouisBrunner/checks-action@v1.1.1 + with: + sha: ${{ steps.sharef.outputs.sha }} + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file