File tree 1 file changed +35
-0
lines changed
1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ on :
2
+ push :
3
+ branches :
4
+ - main
5
+ jobs :
6
+ update_default :
7
+ runs-on : ubuntu-latest
8
+ timeout-minutes : 3
9
+ steps :
10
+ - uses : actions/checkout@v4
11
+ - id : update_default
12
+ run : |
13
+ SBT_VERSION=$(grep '^sbt\.version' "project/build.properties" | tr '=\r' ' ' | awk '{ print $2; }')
14
+ yq e -i ".inputs.sbt-runner-version.default = \"${SBT_VERSION}\"" action.yml
15
+ git add action.yml
16
+ git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
17
+ git config --global user.name "github actions"
18
+ if git commit -m "update default sbt version to ${SBT_VERSION}"; then
19
+ git push -f origin HEAD:"update-default-sbt-${SBT_VERSION}"
20
+ echo "pushed=true" >> $GITHUB_OUTPUT
21
+ echo "sbt_version=${SBT_VERSION}" >> $GITHUB_OUTPUT
22
+ else
23
+ echo "pushed=false" >> $GITHUB_OUTPUT
24
+ fi
25
+ - uses : actions/github-script@v7
26
+ if : steps.update_default.outputs.pushed == 'true'
27
+ with :
28
+ script : |
29
+ await github.rest.pulls.create({
30
+ owner: context.repo.owner,
31
+ repo: context.repo.repo,
32
+ head: "update-default-sbt-${{ steps.update_default.outputs.sbt_version }}",
33
+ base: "${{ github.ref_name }}",
34
+ title: "update default sbt version to ${{ steps.update_default.outputs.sbt_version }}"
35
+ });
You can’t perform that action at this time.
0 commit comments