Update .gitea/workflows/build.yml
This commit is contained in:
parent
72e99157d1
commit
dd61592dd7
@ -11,11 +11,19 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
target: [PI_PICO, PI_PICOW]
|
target: [PI_PICO, PI_PICOW]
|
||||||
|
project_name: [OGX-Mini]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Compare Versions
|
- name: Compare Versions
|
||||||
run: |
|
run: |
|
||||||
|
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": "${{ matrix.project_name }}", \
|
||||||
|
"body": "${{ matrix.project_name }} new: $GITHUB_VERSION" }'
|
||||||
|
|
||||||
GITHUB_REPO="wiredopposite/OGX-Mini"
|
GITHUB_REPO="wiredopposite/OGX-Mini"
|
||||||
GITHUB_VERSION=$(curl -s "https://api.github.com/repos/$GITHUB_REPO/releases/latest" | jq -r .tag_name)
|
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 Latest Version: $GITHUB_VERSION"
|
||||||
@ -29,13 +37,15 @@ jobs:
|
|||||||
|
|
||||||
if [ "$(printf '%s\n' "$GITEA_VERSION" "$GITHUB_VERSION" | sort -V | head -n1)" = "$GITHUB_VERSION" ]; then
|
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.❌❌"
|
echo "❌❌GitHub release is older or the same. Stopping workflow.❌❌"
|
||||||
# exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "✅✅GitHub release is newer. Continuing workflow.✅✅"
|
echo "✅✅GitHub release is newer. Continuing workflow.✅✅"
|
||||||
PB_TOKEN="${{ secrets.PB_TOKEN }}"
|
PB_TOKEN="${{ secrets.PB_TOKEN }}"
|
||||||
curl -u ${PB_TOKEN}: -X POST https://api.pushbullet.com/v2/pushes \
|
curl -u ${PB_TOKEN}: -X POST https://api.pushbullet.com/v2/pushes \
|
||||||
--header 'Content-Type: application/json' \
|
--header 'Content-Type: application/json' \
|
||||||
--data-binary '{"type": "note", "title": "Title", "OGX-Mini": "OGX-Mini new: $GITHUB_VERSION"}'
|
--data-binary '{"type": "note", \
|
||||||
|
"title": "${{ matrix.project_name }}", \
|
||||||
|
"body": "${{ matrix.project_name }} new: $GITHUB_VERSION" }'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Installing dependencies & Cloning repository
|
- name: Installing dependencies & Cloning repository
|
||||||
|
Loading…
x
Reference in New Issue
Block a user