Skip to content

Commit 9fde84c

Browse files
committed
update workflow jobs
1 parent 75d5ad3 commit 9fde84c

File tree

1 file changed

+27
-26
lines changed

1 file changed

+27
-26
lines changed

Diff for: .github/workflows/update_dependencies.yml

+27-26
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,8 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
update_dependencies:
10-
name: Update Dependencies
11-
runs-on: ubuntu-latest
12-
steps:
13-
- name: Checkout java-http-client
14-
uses: actions/checkout@v2
15-
16-
- name: Updating semver dependencies
17-
run: make update-deps
18-
19-
- name: Add & Commit
20-
uses: EndBug/add-and-commit@v8.0.2
21-
with:
22-
add: 'pom.xml'
23-
default_author: 'github_actions'
24-
message: 'Chore: update sendgrid-java dependencies'
25-
26-
test:
27-
name: Test
28-
if: success()
29-
needs: [ update_dependencies ]
9+
update_dependencies_and_test:
10+
name: Update Dependencies & Test
3011
runs-on: ubuntu-latest
3112
timeout-minutes: 20
3213
strategy:
@@ -37,28 +18,48 @@ jobs:
3718
- name: Checkout java-http-client
3819
uses: actions/checkout@v2
3920

21+
- name: Updating semver dependencies
22+
run: make update-deps
23+
4024
- name: Set up Java
4125
uses: actions/setup-java@v2
4226
with:
4327
distribution: 'temurin'
4428
java-version: ${{ matrix.java }}
4529
cache: 'maven'
4630

47-
- run: mvn install -DskipTests=true -Dgpg.skip -Dmaven.javadoc.skip=true -B -V
48-
- name: Run Unit Tests
49-
run: mvn test -B
31+
- run: mvn install -Dgpg.skip -Dmaven.javadoc.skip=true -B -V
32+
33+
commit_dependencies:
34+
name: Commit Updated Dependencies
35+
if: success()
36+
needs: [ update_dependencies_and_test ]
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Checkout java-http-client
40+
uses: actions/checkout@v2
41+
42+
- name: Updating semver dependencies
43+
run: make update-deps
44+
45+
- name: Add & Commit
46+
uses: EndBug/add-and-commit@v8.0.2
47+
with:
48+
add: 'pom.xml'
49+
default_author: 'github_actions'
50+
message: 'Chore: update sendgrid-java dependencies'
5051

5152
notify-on-failure:
5253
name: Slack notify on failure
5354
if: failure()
54-
needs: [ update_dependencies, test ]
55+
needs: [ update_dependencies_and_test, commit_dependencies ]
5556
runs-on: ubuntu-latest
5657
steps:
5758
- uses: rtCamp/action-slack-notify@v2
5859
env:
5960
SLACK_COLOR: failure
6061
SLACK_ICON_EMOJI: ':github:'
61-
SLACK_MESSAGE: ${{ format('Update dependencies *{0}*, Test *{1}*, {2}/{3}/actions/runs/{4}', needs.update_dependencies.result, needs.tests.result, github.server_url, github.repository, github.run_id) }}
62+
SLACK_MESSAGE: ${{ format('Update dependencies *{0}*, commit dependencies *{1}*, {2}/{3}/actions/runs/{4}', needs.update_dependencies_and_test.result, needs.commit_dependencies.result, github.server_url, github.repository, github.run_id) }}
6263
SLACK_TITLE: Action Failure - ${{ github.repository }}
6364
SLACK_USERNAME: GitHub Actions
6465
SLACK_MSG_AUTHOR: twilio-dx

0 commit comments

Comments
 (0)