1515name : Build e2e tests 
1616
1717on :
18-   workflow_run :
19-     workflows :
20-       - Trigger build 
21-     types :
22-       - completed 
18+   push :
19+     branches : [ develop, release/** ] 
20+   pull_request :
21+     branches : [ develop, release/** ] 
22+     types : [ opened, synchronize, reopened, labeled ] 
23+   workflow_dispatch :
2324
2425jobs :
2526  build :
2627    runs-on : k8s-runner-e2e 
27- 
28-     if : ${{ github.event.workflow_run.conclusion != 'skipped' }} 
28+     #  We allow builds:
29+     #  1) When triggered manually
30+     #  2) When it's a merge into a branch
31+     #  3) For PRs that are labeled as build and
32+     #   - It's a code change
33+     #   - A build label was just added
34+     #  A bit complex, but prevents builds when other labels are manipulated
35+     if : > 
36+       github.event_name == 'workflow_dispatch' 
37+       || github.event_name == 'push' 
38+       || (contains(github.event.pull_request.labels.*.name, 'build') 
39+           && (github.event.action != 'labeled' || github.event.label.name == 'build') 
40+           ) 
2941
3042steps :
31-       #  Pinned 1.0.0 version
32-       - uses : haya14busa/action-workflow_run-status@967ed83efa565c257675ed70cfe5231f062ddd94 
33-       - uses : actions/checkout@v3 
43+       - uses : actions/checkout@v4 
3444        with :
3545          path : plugin 
36-           ref : ${{ github.event.workflow_run.head_sha }} 
3746
3847      - name : Checkout e2e test repo 
3948        uses : actions/checkout@v3 
5160
5261name : Get Secrets from GCP Secret Manager 
5362        id : ' secrets' 
54-         uses : ' google-github-actions/get-secretmanager-secrets@v0 ' 
63+         uses : ' google-github-actions/get-secretmanager-secrets@v2 ' 
5564        with :
5665          secrets : |- 
5766            SALESFORCE_USERNAME:cdapio-github-builds/SALESFORCE_USERNAME 
6978          SALESFORCE_CONSUMER_KEY : ${{ steps.secrets.outputs.SALESFORCE_CONSUMER_KEY }} 
7079          SALESFORCE_CONSUMER_SECRET : ${{ steps.secrets.outputs.SALESFORCE_CONSUMER_SECRET }} 
7180
72-       - name : Upload report 
73-         uses : actions/upload-artifact@v3 
74-         if : always() 
75-         with :
76-           name : Cucumber report 
77-           path : ./plugin/target/cucumber-reports 
78- 
7981      - name : Upload debug files 
8082        uses : actions/upload-artifact@v3 
8183        if : always() 
@@ -84,18 +86,13 @@ jobs:
8486          path : ./**/target/e2e-debug 
8587
8688      - name : Upload reports to GCS 
87-         uses : google-github-actions/upload-cloud-storage@v0  
89+         uses : google-github-actions/upload-cloud-storage@v2  
8890        if : always() 
8991        with :
9092          path : ./plugin/target/cucumber-reports 
9193          destination : e2e-tests-cucumber-reports/${{ github.event.repository.name }}/${{ github.ref }} 
9294
93-       - name : github-status-action 
94-         uses : Sibz/github-status-action@67af1f4042a5a790681aad83c44008ca6cfab83d 
95+       - name : Cucumber Report URL 
9596        if : always() 
96-         with :
97-           authToken : ${{ secrets.GITHUB_TOKEN }} 
98-           state : success 
99-           context : Cucumber report 
100-           sha : ${{github.event.pull_request.head.sha || github.sha}} 
97+         run : echo "https://storage.googleapis.com/e2e-tests-cucumber-reports/${{ github.event.repository.name }}/${{ github.ref }}/cucumber-reports/advanced-reports/cucumber-html-reports/overview-features.html" 
10198
0 commit comments