-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (64 loc) · 2.33 KB
/
update-resources.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Update and Create Pull Request
on:
schedule:
- cron: '0 0 * * *' # Run once a day
workflow_dispatch: {}
jobs:
update-and-create-pr:
# Only on main repository (don't create PRs on forks)
if: github.repository_owner == 'wetransform'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Download resources and run tests
run: |
./gradlew downloads jars publishJarsToMavenLocal :test:test
env:
ORG_GRADLE_PROJECT_wetfArtifactoryUser: ${{ secrets.WETF_ARTIFACTORY_USER }}
ORG_GRADLE_PROJECT_wetfArtifactoryPassword: ${{ secrets.WETF_ARTIFACTORY_PASSWORD }}
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: always() # always run even if the previous step fails
with:
report_paths: "test/build/test-results/**/*.xml"
require_tests: true
# Workaround for check that is additionally created being associated
# to the wrong workflow/run. Instead no additional check is created.
# See https://github.com/mikepenz/action-junit-report/issues/40
annotate_only: true
detailed_summary: true
fail_on_failure: true
- name: Create Pull Request for changes
# https://github.com/marketplace/actions/create-pull-request
uses: peter-evans/[email protected]
with:
commit-message: "refactor: automated resource update"
committer: wetransform Bot <[email protected]>
branch: auto-update
title: Update offline resources
body: Please review the changes to the resources. Merge to create updated artifacts.
base: master
reviewers: |
stempler
florianesser
kapil-agnihotri
- name: Notify slack on failure
# https://github.com/marketplace/actions/slack-notify-build
uses: voxmedia/github-action-slack-notify-build@v1
if: failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
with:
channel: build-failures
status: FAILED
color: danger