Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to GregTechCEu/Buildscripts #50

Closed
wants to merge 3 commits into from
Closed
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
35 changes: 35 additions & 0 deletions .github/workflows/update_buildscript.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Checks daily to see if the buildscript is in need of an update
name: Buildscript Updating

on:
schedule:
- cron: "0 0 * * *" # "min hr day month year", so run once per day

jobs:
buildscript-update:
runs-on: ubuntu-latest
# Avoid running this workflow on forks
if: github.repository == 'GregTechCEu/gregicality-multiblocks'
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Ensure build script version is up to date
id: update-buildscript
run: |
curl https://raw.githubusercontent.com/GregTechCEu/Buildscripts/master/build.gradle --output build.gradle
new_version=$(head -1 build.gradle | sed -r 's|//version: (.*)|\1|g')
echo "NEW_VERSION=$new_version" >> "$GITHUB_OUTPUT"

- name: Create Pull Request
id: create-pull-request
uses: peter-evans/create-pull-request@v4
with:
add-paths: build.gradle
commit-message: 'update build script version to ${{ steps.update-buildscript.outputs.NEW_VERSION }}'
branch: gha-update-buildscript
title: Update build script version to ${{ steps.update-buildscript.outputs.NEW_VERSION }}
body: This pull request is created by the buildscript-update workflow
Loading