From 4674f57d53758accd28ca17c6e933b4206060f95 Mon Sep 17 00:00:00 2001 From: Guillaume Falourd Date: Thu, 8 Sep 2022 08:32:32 -0300 Subject: [PATCH 1/4] update workflow-tester55 Signed-off-by: Guillaume Falourd --- .github/workflows/workflow-tester55.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/workflow-tester55.yml b/.github/workflows/workflow-tester55.yml index 4adc79229f..a99e1dde26 100644 --- a/.github/workflows/workflow-tester55.yml +++ b/.github/workflows/workflow-tester55.yml @@ -4,6 +4,11 @@ on: pull_request: types: [opened, synchronize, reopened, edited] +# opened: when the PR is opened +# reopened: when the PR is reopened +# synchronize: when the PR description is edited +# edited: + jobs: job1: runs-on: ubuntu-latest From cbcf35010b209b38494da36e64bcb982406f82f3 Mon Sep 17 00:00:00 2001 From: Guillaume Falourd Date: Thu, 8 Sep 2022 08:32:56 -0300 Subject: [PATCH 2/4] update workflow-tester55 job1 Signed-off-by: Guillaume Falourd --- .github/workflows/workflow-tester55.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/workflow-tester55.yml b/.github/workflows/workflow-tester55.yml index a99e1dde26..e940e82b42 100644 --- a/.github/workflows/workflow-tester55.yml +++ b/.github/workflows/workflow-tester55.yml @@ -13,9 +13,6 @@ jobs: job1: runs-on: ubuntu-latest steps: - - name: Dump GitHub Event - run: echo ${{ github.event }} - - name: Dump GitHub context env: GITHUB_CONTEXT: ${{ toJSON(github) }} From 208240eced2fedca54972680e3a85e25132616a7 Mon Sep 17 00:00:00 2001 From: Guillaume Falourd Date: Thu, 8 Sep 2022 08:41:31 -0300 Subject: [PATCH 3/4] update workflow 55 Signed-off-by: Guillaume Falourd --- .github/workflows/workflow-tester55.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/workflow-tester55.yml b/.github/workflows/workflow-tester55.yml index e940e82b42..9136f126c1 100644 --- a/.github/workflows/workflow-tester55.yml +++ b/.github/workflows/workflow-tester55.yml @@ -6,13 +6,14 @@ on: # opened: when the PR is opened # reopened: when the PR is reopened -# synchronize: when the PR description is edited -# edited: +# synchronize: when the PR description or files are edited +# edited: when editing the title jobs: job1: runs-on: ubuntu-latest steps: + - run: echo "GITHUB ACTION:" ${{ github.event.action }} - name: Dump GitHub context env: GITHUB_CONTEXT: ${{ toJSON(github) }} @@ -20,7 +21,7 @@ jobs: job2: runs-on: ubuntu-latest - if: github.event.pull_request.edited == true + if: github.event.action == 'edited' steps: - run: | echo "Pull Request EDITED" @@ -28,7 +29,7 @@ jobs: job3: runs-on: ubuntu-latest - if: github.event.pull_request.edited != true + if: github.event.action != 'edited' steps: - run: | echo "Pull Request NOT EDITED" From 508a49d328881843d21c7a15a037b115749a8b36 Mon Sep 17 00:00:00 2001 From: Guillaume Falourd Date: Thu, 29 Sep 2022 08:53:34 -0300 Subject: [PATCH 4/4] test Signed-off-by: Guillaume Falourd --- .github/workflows/workflow-tester55.yml | 2 +- .github/workflows/workflow-tester57.yml | 34 +++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/workflow-tester57.yml diff --git a/.github/workflows/workflow-tester55.yml b/.github/workflows/workflow-tester55.yml index 9136f126c1..e4f0d60e62 100644 --- a/.github/workflows/workflow-tester55.yml +++ b/.github/workflows/workflow-tester55.yml @@ -33,4 +33,4 @@ jobs: steps: - run: | echo "Pull Request NOT EDITED" - echo ${{ github.event }} \ No newline at end of file + echo ${{ github.event }} diff --git a/.github/workflows/workflow-tester57.yml b/.github/workflows/workflow-tester57.yml new file mode 100644 index 0000000000..af23b64280 --- /dev/null +++ b/.github/workflows/workflow-tester57.yml @@ -0,0 +1,34 @@ +name: Test 57 #Related to SO https://stackoverflow.com/questions/73890119/gitaction-trigger-workflow-on-pr-approval-and-when-base-branch-is-main-and-csv + +on: + pull_request_review: + types: [submitted] + branches: + - main + +jobs: + job1: + if: github.event.review.state == 'approved' && startsWith(github.base_ref, 'main/') + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2.2.0 + - name: Check if *.csv is modified + uses: dorny/paths-filter@v2.2.1 + id: changes + with: + filters: | + csv: + - 'data/*.csv' + - name: Run process bmv script + if: ${{ steps.changes.outputs.csv == 'true' }} + run: | + echo "-Started running script-" + + github-context: + runs-on: ubuntu-latest + steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJSON(github) }} + run: echo "$GITHUB_CONTEXT" \ No newline at end of file