lune-packaging/.github/workflows/update.yaml

39 lines
999 B
YAML

name: Update Lune Sources
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
update:
name: Update the lune-src submodule
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
fetch-tags: true
- name: Update submodule
run: git submodule update --recursive --remote
- name: Update lune.COMMIT
run: git rev-parse HEAD | cut -c -7 > ../lune.COMMIT
working-directory: "lune-src"
- name: Update lune.VERSION
run: git describe --tags --abbrev=0 > ../lune.VERSION
working-directory: "lune-src"
- name: Push changes
run: |-
git diff
git config --global user.email "hi@devcomp.xyz"
git config --global user.name "CI"
git diff --quiet || (git add -u && git commit -m "chore: update lune sources")
git push