Test using environment variable
All checks were successful
Get latest release version / get-version (push) Successful in 8s
All checks were successful
Get latest release version / get-version (push) Successful in 8s
This commit is contained in:
@@ -1,7 +1,11 @@
|
|||||||
name: Get latest release version
|
name: Get latest release version
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "30 * * * *"
|
- cron: "40 * * * *"
|
||||||
|
|
||||||
|
env:
|
||||||
|
VERSION_TAG: ""
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
get-version:
|
get-version:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -14,17 +18,18 @@ jobs:
|
|||||||
- name: Fetch release version
|
- name: Fetch release version
|
||||||
id: version-check
|
id: version-check
|
||||||
run: |
|
run: |
|
||||||
GITHUB_OUTPUT="VERSION_TAG=$(curl -sL https://api.github.com/repos/pterodactyl/panel/releases/latest | jq -r .tag_name)"
|
VERSION_TAG=$(curl -sL https://api.github.com/repos/pterodactyl/panel/releases/latest | jq -r .tag_name)
|
||||||
echo "$GITHUB_OUTPUT"
|
echo "$VERSION_TAG"
|
||||||
echo "$GITHUB_OUTPUT" > release-versions/panel-latest.txt
|
echo "$VERSION_TAG" > release-versions/panel-latest.txt
|
||||||
- name: Check for modified files
|
- name: Check for modified files
|
||||||
id: git-check
|
id: git-check
|
||||||
run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true")
|
run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true")
|
||||||
- name: Commit latest release version
|
- name: Commit latest release version
|
||||||
if: steps.git-check.outputs.modified == 'true'
|
if: steps.git-check.outputs.modified == 'true'
|
||||||
|
needs: version-check
|
||||||
run: |
|
run: |
|
||||||
echo "${{ steps.version-check.outputs.VERSION_TAG }}"
|
echo "$VERSION_TAG"
|
||||||
git config --global user.name 'Mindfang'
|
git config --global user.name 'Mindfang'
|
||||||
git config --global user.email 'mindfang@taco.quest'
|
git config --global user.email 'mindfang@taco.quest'
|
||||||
git commit -am "Trigger new release autobuild for ${{ steps.vars.outputs.VERSION_TAG }}"
|
git commit -am "Trigger new release autobuild for $VERSION_TAG"
|
||||||
git push
|
git push
|
||||||
|
Reference in New Issue
Block a user