Skip to content

Update and Create Pull Request #265

Update and Create Pull Request

Update and Create Pull Request #265

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@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
- name: Download resources and run tests
run: |
./gradlew downloads jars haleResourceBundles 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@db71d41eb79864e25ab0337e395c352e84523afe # v4.3.1
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/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
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.
To trigger the pull request check please manually close and reopen the pull request (see [here](https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#workarounds-to-trigger-further-workflow-runs) for more information).
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@3665186a8c1a022b28a1dbe0954e73aa9081ea9e # v1.6.0
if: failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
with:
channel: build-failures
status: FAILED
color: danger