Compare commits
No commits in common. "main" and "v1.0.0-alpha3" have entirely different histories.
main
...
v1.0.0-alp
@ -18,28 +18,31 @@ jobs:
|
|||||||
- name: Compare Versions
|
- name: Compare Versions
|
||||||
run: |
|
run: |
|
||||||
GITHUB_REPO="wiredopposite/OGX-Mini"
|
GITHUB_REPO="wiredopposite/OGX-Mini"
|
||||||
echo "GITHUB_REPO=$GITHUB_REPO" >> $GITEA_ENV
|
|
||||||
|
|
||||||
GITEA_URL="https://git.sthope.dev"
|
GITEA_URL="https://git.sthope.dev"
|
||||||
echo "GITEA_URL=$GITEA_URL" >> $GITEA_ENV
|
|
||||||
GITEA_REPO="sthope/OGX-Mini"
|
GITEA_REPO="sthope/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_VERSION=$GITHUB_VERSION" >> $GITEA_ENV
|
|
||||||
|
|
||||||
GITEA_VERSION=$(curl -s "$GITEA_URL/api/v1/repos/$GITEA_REPO/releases/latest" -H 'accept: application/json' | jq -r '.tag_name')
|
GITEA_VERSION=$(curl -s "$GITEA_URL/api/v1/repos/$GITEA_REPO/releases/latest" -H 'accept: application/json' | jq -r '.tag_name')
|
||||||
echo "GITEA_VERSION=$GITEA_VERSION" >> $GITEA_ENV
|
echo "GITHUB_REPO=$GITHUB_REPO" >> $GITEA_ENV
|
||||||
|
echo "GITHUB_VERSION=$GITHUB_VERSION" >> $GITEA_ENV
|
||||||
echo "GitHub Latest Version: $GITHUB_VERSION"
|
echo "GitHub Latest Version: $GITHUB_VERSION"
|
||||||
echo "Gitea Latest Version: $GITEA_VERSION"
|
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
|
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
|
||||||
|
PB_TOKEN="${{ secrets.PB_TOKEN }}"
|
||||||
|
PB_TITLE="${{ matrix.project_name }}"
|
||||||
|
curl -u ${PB_TOKEN}: -X POST https://api.pushbullet.com/v2/pushes --header 'Content-Type: application/json' --data-binary '{"type": "note", "title": "${PB_TITLE}", "body": "${PB_TITLE} new: $GITHUB_VERSION" }'
|
||||||
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 --header 'Content-Type: application/json' --data-binary '{"type": "note", "title": "${{ matrix.project_name }}", "body": "${{ matrix.target }} new firmware" }'
|
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" }'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Installing dependencies & Cloning repository
|
- name: Installing dependencies & Cloning repository
|
||||||
@ -66,9 +69,9 @@ jobs:
|
|||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.target }}-${{ env.GITHUB_VERSION }}.uf2
|
name: ${{ matrix.target }}.uf2
|
||||||
path: |
|
path: |
|
||||||
${{ gitea.workspace }}/output/*.uf2
|
${{ gitea.workspace }}/output/${{ matrix.target }}.uf2
|
||||||
|
|
||||||
- name: Upload Release
|
- name: Upload Release
|
||||||
uses: akkuman/gitea-release-action@v1
|
uses: akkuman/gitea-release-action@v1
|
||||||
@ -77,4 +80,4 @@ jobs:
|
|||||||
tag_name: "${{ env.GITHUB_VERSION }}"
|
tag_name: "${{ env.GITHUB_VERSION }}"
|
||||||
prerelease: false
|
prerelease: false
|
||||||
files: |-
|
files: |-
|
||||||
${{ gitea.workspace }}/output/*.uf2
|
${{ gitea.workspace }}/output/${{ matrix.target }}.uf2
|
Loading…
x
Reference in New Issue
Block a user