All checks were successful
Get latest release version / get-version (push) Successful in 6s
34 lines
1.3 KiB
YAML
34 lines
1.3 KiB
YAML
name: Get latest release version
|
|
on:
|
|
schedule:
|
|
- cron: "57 * * * *"
|
|
|
|
jobs:
|
|
get-version:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
token: ${{ secrets.REPO_MOD_TOKEN }}
|
|
- name: Prepare the container
|
|
run: apt-get update && apt-get --no-install-recommends -y install jq
|
|
- name: Fetch release version
|
|
id: version-check
|
|
run: |
|
|
VERSION_TAG=$(curl -sL https://api.github.com/repos/pterodactyl/panel/releases/latest | jq -r .tag_name)
|
|
echo "$VERSION_TAG"
|
|
echo "$VERSION_TAG" > release-versions/panel-latest.txt
|
|
echo ::set-output name=version_tag::"$VERSION_TAG"
|
|
- name: Check for modified files
|
|
id: git-check
|
|
run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true")
|
|
- name: Commit latest release version
|
|
if: steps.git-check.outputs.modified == 'true'
|
|
needs: version-check
|
|
run: |
|
|
echo "${{ steps.version-check.outputs.version-tag }}"
|
|
git config --global user.name 'Mindfang'
|
|
git config --global user.email 'mindfang@taco.quest'
|
|
git commit -am "Trigger new release autobuild for ${{ steps.version-check.outputs.version-tag }}"
|
|
git push
|