Skip to content

RefreshVersions

RefreshVersions #6

# Creates a PR on an interval if there are dependencies need to be updated.
name: RefreshVersions
on:
workflow_dispatch:
schedule:
- cron: '0 7 * * 1'
jobs:
"Refresh-Versions":
runs-on: "ubuntu-latest"
steps:
- id: step-0
name: Set current date as env variable
run: echo "NOW=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV
- id: step-1
name: check-out
uses: actions/checkout@v3
with:
ref: develop
- id: step-2
name: setup-java
uses: actions/setup-java@v3
with:
java-version: 17
distribution: adopt
- id: step-3
name: create-branch
uses: peterjgrainger/[email protected]
with:
branch: dependency-update-$NOW
env:
GITHUB_TOKEN: {{ secrets.GITHUB_TOKEN }}

Check failure on line 34 in .github/workflows/refresh_versions.yml

View workflow run for this annotation

GitHub Actions / RefreshVersions

Invalid workflow file

The workflow is not valid. .github/workflows/refresh_versions.yml (Line: 34, Col: 25): A mapping was not expected .github/workflows/refresh_versions.yml (Line: 58, Col: 25): A mapping was not expected
- id: step-4
name: gradle refreshVersions
uses: gradle/gradle-build-action@v2
with:
arguments: refreshVersions
- id: step-5
name: Commit
uses: EndBug/add-and-commit@v9
with:
author_name: GitHub Actions
author_email: [email protected]
message: Refresh versions.properties
new_branch: dependency-update-$NOW
push: --force --set-upstream origin dependency-update-$NOW
- id: step-6
name: Pull Request
uses: repo-sync/pull-request@v2
with:
source_branch: dependency-update
destination_branch: main
pr_title: Upgrade dependencies
pr_body: '[refreshVersions](https://github.com/jmfayard/refreshVersions) has found these library updates!'
pr_draft: true
github_token: {{ secrets.GITHUB_TOKEN }}