@@ -8,18 +8,28 @@ permissions:
88on :
99 push :
1010 pull_request :
11- types : [opened, synchronize, ready_for_review, reopened]
12- # pull_request trigger only needed for protect-nyc-config (uses PR API).
13- # All other jobs run on push only — GitHub shows push checks on PRs too.
11+ types : [opened, synchronize, ready_for_review, reopened, edited]
1412
1513env :
1614 CI_BUILD_NUM : ${{ github.run_id }}
1715 CI_BRANCH : ${{ github.ref_name }}
1816 HLX_AWS_REGION : ${{ secrets.AWS_REGION }}
1917jobs :
20- protect-nyc-config :
18+ validate-pr-title :
2119 if : github.event_name == 'pull_request'
2220 runs-on : ubuntu-latest
21+ permissions :
22+ contents : read
23+ pull-requests : read
24+ steps :
25+ - name : Validate PR title
26+ uses : amannn/action-semantic-pull-request@v6
27+ env :
28+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
29+
30+ protect-nyc-config :
31+ if : github.event_name == 'pull_request' && github.event.action != 'edited'
32+ runs-on : ubuntu-latest
2333 permissions :
2434 contents : read
2535 pull-requests : read
3343 uses : ./.github/actions/protect-nyc-config
3444
3545 build :
36- if : github.event_name == 'push'
46+ if : github.event_name == 'push' || github.event.action != 'edited'
3747 runs-on : ubuntu-latest
3848 steps :
3949 - name : Check out
5868 GITHUB_TOKEN : ${{ secrets.ADOBE_BOT_GITHUB_TOKEN }}
5969 NPM_TOKEN : ${{ secrets.ADOBE_BOT_NPM_TOKEN }}
6070
61- it-dynamo :
62- runs-on : ubuntu-latest
63- needs : build
64- timeout-minutes : 30
65- steps :
66- - name : Check out
67- uses : actions/checkout@v5
68- with :
69- persist-credentials : ' false'
70-
71- - name : Set up JDK 17
72- uses : actions/setup-java@v5
73- with :
74- distribution : ' temurin'
75- java-version : ' 17'
76-
77- - name : Setup Node & NPM
78- uses : ./.github/actions/setup-node-npm
79- env :
80- MYSTICAT_DATA_SERVICE_REPO_READ_TOKEN : ${{ secrets.MYSTICAT_DATA_SERVICE_REPO_READ_TOKEN }}
81-
82- - name : Run DynamoDB Integration Tests
83- run : npx mocha --require test/it/dynamo/harness.js --timeout 30000 'test/it/dynamo/**/*.test.js'
84-
85- it-postgres :
86- runs-on : ubuntu-latest
87- needs : build
88- timeout-minutes : 15
89- steps :
90- - name : Check out
91- uses : actions/checkout@v5
92- with :
93- persist-credentials : ' false'
94-
95- - name : Configure AWS credentials (ECR pull)
96- uses : aws-actions/configure-aws-credentials@v4
97- with :
98- role-to-assume : ${{ secrets.AWS_ECR_PULL_ROLE_ARN }}
99- aws-region : us-east-1
100-
101- - name : Login to Amazon ECR
102- uses : aws-actions/amazon-ecr-login@v2
103-
104- - name : Setup Node & NPM
105- uses : ./.github/actions/setup-node-npm
106- env :
107- MYSTICAT_DATA_SERVICE_REPO_READ_TOKEN : ${{ secrets.MYSTICAT_DATA_SERVICE_REPO_READ_TOKEN }}
108-
109- - name : Run PostgreSQL Integration Tests
110- run : npx mocha --require test/it/postgres/harness.js --timeout 30000 'test/it/postgres/**/*.test.js'
111-
11271 semantic-release :
11372 runs-on : ubuntu-latest
114- needs : [ build, it-dynamo, it-postgres]
73+ needs : build
11574 if : github.event_name == 'push' && github.ref == 'refs/heads/main'
11675 steps :
11776 - name : Check out
@@ -142,7 +101,7 @@ jobs:
142101
143102 deploy-stage :
144103 runs-on : ubuntu-latest
145- needs : [ build, it-dynamo, it-postgres]
104+ needs : build
146105 if : github.event_name == 'push' && github.ref == 'refs/heads/main'
147106 steps :
148107 - name : Check out
@@ -168,7 +127,7 @@ jobs:
168127
169128 upload-build-artifacts :
170129 runs-on : ubuntu-latest
171- needs : [ build, it-dynamo, it-postgres]
130+ needs : build
172131 if : github.event_name == 'push' && github.ref == 'refs/heads/main'
173132 steps :
174133 - name : Check out
@@ -206,7 +165,7 @@ jobs:
206165
207166 branch-deploy :
208167 runs-on : ubuntu-latest
209- needs : [ build, it-dynamo, it-postgres]
168+ needs : build
210169 if : github.event_name == 'push' && github.ref != 'refs/heads/main'
211170 steps :
212171 - name : Check out
0 commit comments