Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
599776bc25 | ||
|
55c27d6b41 | ||
|
2171145215 | ||
|
69dd0c92fa |
@ -25,6 +25,31 @@ jobs:
|
|||||||
filename: pmc+
|
filename: pmc+
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
- name: Compare Versions
|
||||||
|
run: |
|
||||||
|
GITHUB_REPO="sd2psXtd/firmware"
|
||||||
|
GITHUB_VERSION=$(curl -s "https://api.github.com/repos/$GITHUB_REPO/releases/latest" | jq -r .tag_name)
|
||||||
|
echo "GitHub Latest Version: $GITHUB_VERSION"
|
||||||
|
echo "GITHUB_VERSION=$GITHUB_VERSION" >> $GITEA_ENV
|
||||||
|
|
||||||
|
GITEA_URL="https://git.sthope.dev"
|
||||||
|
GITEA_REPO="sthope/sd2psXtd"
|
||||||
|
GITEA_VERSION=$(curl -s "$GITEA_URL/api/v1/repos/$GITEA_REPO/releases/latest" -H 'accept: application/json' | jq -r '.tag_name')
|
||||||
|
echo "Gitea Latest Version: $GITEA_VERSION"
|
||||||
|
echo "GITEA_VERSION=$GITEA_VERSION" >> $GITEA_ENV
|
||||||
|
|
||||||
|
if [ "$(printf '%s\n' "$GITEA_VERSION" "$GITHUB_VERSION" | sort -V | head -n1)" = "$GITHUB_VERSION" ]; then
|
||||||
|
echo "❌❌GitHub release is older or the same. Stopping workflow.❌❌"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "✅✅GitHub release is newer. Continuing workflow.✅✅"
|
||||||
|
PB_TOKEN="${{ secrets.PB_TOKEN }}"
|
||||||
|
curl -u ${PB_TOKEN}: -X POST https://api.pushbullet.com/v2/pushes \
|
||||||
|
--header 'Content-Type: application/json' \
|
||||||
|
--data-binary '{"type": "note", "title": "Title", "sd2psXtd": "sd2psXtd new: $GITHUB_VERSION"}'
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Installing dependencies & Cloning repository
|
- name: Installing dependencies & Cloning repository
|
||||||
run: |
|
run: |
|
||||||
apt-get update
|
apt-get update
|
||||||
@ -70,6 +95,7 @@ jobs:
|
|||||||
uses: akkuman/gitea-release-action@v1
|
uses: akkuman/gitea-release-action@v1
|
||||||
with:
|
with:
|
||||||
name: "${{ env.SD2PSX_VERSION }}"
|
name: "${{ env.SD2PSX_VERSION }}"
|
||||||
|
tag_name: "${{ env.SD2PSX_VERSION }}"
|
||||||
prerelease: false
|
prerelease: false
|
||||||
files: |-
|
files: |-
|
||||||
${{ gitea.workspace }}/output/${{ matrix.filename }}${{ matrix.ext }}
|
${{ gitea.workspace }}/output/${{ matrix.filename }}${{ matrix.ext }}
|
Loading…
x
Reference in New Issue
Block a user