-
-
Notifications
You must be signed in to change notification settings - Fork 60
34 lines (29 loc) · 1.07 KB
/
daily.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Daily check for updates
on:
schedule:
- cron: '0 0 * * *' # Run daily at midnight UTC
workflow_dispatch:
jobs:
check-tags:
outputs:
tags_match: ${{ steps.compare_tags.outputs.TAGS_MATCH }}
runs-on: ubuntu-latest
steps:
- name: Compare release tags
id: compare_tags
run: |
LOCAL_TAG=$(curl -s "https://api.github.com/repos/${{ github.repository }}/releases/latest" | jq -r .tag_name)
REMOTE_TAG=$(curl -s "https://api.github.com/repos/microsoft/PowerToys/releases/latest" | jq -r .tag_name)
echo "Local tag: $LOCAL_TAG"
echo "Remote tag: $REMOTE_TAG"
if [ "$LOCAL_TAG" = "$REMOTE_TAG" ]; then
echo "Tags match. Exiting."
echo "TAGS_MATCH=true" >> $GITHUB_OUTPUT
else
echo "Tags do not match. Proceeding to next action."
echo "TAGS_MATCH=false" >> $GITHUB_OUTPUT
fi
run-if-tags-differ:
needs: check-tags
if: ${{ needs.check-tags.outputs.tags_match == 'false' }}
uses: ./.github/workflows/build.yml