Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
run: ./gradlew test

- name: Process junit reports
uses: mikepenz/action-junit-report@v5.4.0
uses: mikepenz/action-junit-report@v5.5.0
if: always()
with:
report_paths: 'build/test-results/test/TEST-*.xml'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/search.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
- name: Run search tests
run: ./gradlew testSearch

- uses: mikepenz/action-junit-report@v5.4.0
- uses: mikepenz/action-junit-report@v5.5.0
if: always()
with:
report_paths: 'build/test-results/testSearch/TEST-*.xml'
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/update-elasticsearch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
...

name: update elasticsearch service

'on':
pull_request:
branches:
- 'dependabot/*elasticsearch*'
push:
branches:
- 'dependabot/*elasticsearch*'
paths-ignore:
- docker-compose.yml
workflow_call:

jobs:
update-elasticsearch-service:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/[email protected]

- name: install jq/yq
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends jq yq

- name: get newest elasticsearch version from github
id: latest
run: >-
latest=$(
curl -s https://api.github.com/repos/elastic/elasticsearch/releases
| jq -r '[.[] | select(.prerelease==false) | .tag_name] | max'
); echo "latest=${latest#v}" >> "${GITHUB_OUTPUT}"

- name: get version of our elasticsearch service
id: current
run: |
cur=$(yq -r .services.es.image docker-compose.yml)
echo "current=${cur#*:}" >> "${GITHUB_OUTPUT}"

- name: bump docker compose elasticsearch version
run: >-
sed -i 's/\(elasticsearch:\)'${OLD}'/\1'${NEW}'/' docker-compose.yml
env:
OLD: ${{ steps.current.outputs.current }}
NEW: ${{ steps.latest.outputs.latest }}

- name: push change
run: |
git config user.email "${GIT_MAIL}"
git config user.name "github-actions[bot]"
git add docker-compose.yml
git commit -m "bump elasticsearch from ${OLD} to ${NEW}"
git push
env:
OLD: ${{ steps.current.outputs.current }}
NEW: ${{ steps.latest.outputs.latest }}
GIT_MAIL: >-
41898282+github-actions[bot]@users.noreply.github.com
continue-on-error: true

---
15 changes: 13 additions & 2 deletions .github/workflows/update-gradle-wrapper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ on:
- cron: "0 0 * * *"

jobs:

update-gradle-wrapper:
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.changed.outputs.changed }}

steps:
- uses: actions/[email protected]
Expand All @@ -25,8 +28,16 @@ jobs:
labels: dependencies, gradle
reviewers: jkatzwinkel

- run: git branch --show-current
- name: determine change status
id: changed
run: |
chg=$(git diff --shortstat HEAD..main | wc -l)
echo "changed=${chg}" >> ${GITHUB_OUTPUT}

- uses: ./.github/workflows/gradle.yml
post-update-tests:
runs-on: ubuntu-latest
needs: [update-gradle-wrapper]
uses: ./.github/workflows/gradle.yml
if: needs.update-gradle-wrapper.outputs.changed != '0'

...
Loading