Skip to content

Commit 163d73d

Browse files
authored
Create check.yml
1 parent cc12498 commit 163d73d

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/check.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Check Versions
2+
3+
on:
4+
schedule:
5+
- cron: '59 ** * * *'
6+
7+
env:
8+
REGISTRY: ghcr.io
9+
IMAGE_NAME: ${{ github.repository }}
10+
DESTINATION_REPOSITORY: github/codeql-action
11+
SOURCE_REPOSITORY: ${{ github.repository }}
12+
13+
jobs:
14+
check:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v2
19+
20+
- name: Compare The Latest Releases Between Two Repositories
21+
id: compare-releases
22+
uses: NickLiffen/compare-releases@v2.0.4
23+
with:
24+
destinationRepository: ${{ env.DESTINATION_REPOSITORY }}
25+
sourceRepository: ${{ env.SOURCE_REPOSITORY }}
26+
token: ${{ secrets.GH_TOKEN }}
27+
28+
- name: Get result
29+
run: |
30+
echo "The result is ${{ steps.compare-releases.outputs.repo }}"
31+
echo "The result is ${{ steps.compare-releases.outputs.tagName }}"
32+
33+
- name: Invoke Release Workflow
34+
if: ${{ steps.compare-releases.outputs.repo == env.DESTINATION_REPOSITORY }}
35+
uses: benc-uk/workflow-dispatch@v1
36+
with:
37+
workflow: release
38+
token: ${{ secrets.GH_TOKEN }}
39+
inputs: '{ "tagName": "${{ steps.compare-releases.outputs.tagName }}" }'
40+

0 commit comments

Comments
 (0)