-
Notifications
You must be signed in to change notification settings - Fork 9
60 lines (54 loc) · 1.56 KB
/
check-updates.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Check for a new client version
on:
schedule:
- cron: '*/5 * * * *'
workflow_dispatch:
jobs:
skip-duplicates:
name: Skip update if job is already in progress
runs-on: ubuntu-latest
outputs:
should-skip: ${{ steps.skip-check.outputs.should_skip }}
steps:
- id: skip-check
uses: fkirc/skip-duplicate-actions@v5
with:
do_not_skip: '[]'
skip_after_successful_duplicate: 'false'
concurrent_skipping: 'always'
check-update:
runs-on: ubuntu-latest
needs: skip-duplicates
if: ${{ needs.skip-duplicates.outputs.should-skip != 'true' }}
outputs:
latest: ${{ steps.check-update.outputs.latest }}
dev: ${{ steps.check-update.outputs.dev }}
integration: ${{ steps.check-update.outputs.dev }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
- name: Check for updates
id: check-update
run: yarn check-updates
update-latest:
name: Update latest tag
needs:
- check-update
if: ${{ needs.check-update.outputs.latest != ''}}
uses: ./.github/workflows/update-and-publish.yml
secrets: inherit
with:
npmTag: latest
version: ${{ needs.check-update.outputs.latest }}
update-dev:
name: Update dev tag
needs:
- check-update
if: ${{ needs.check-update.outputs.dev != ''}}
uses: ./.github/workflows/update-and-publish.yml
secrets: inherit
with:
npmTag: dev
version: ${{ needs.check-update.outputs.dev }}