File tree Expand file tree Collapse file tree 2 files changed +56
-5
lines changed
Expand file tree Collapse file tree 2 files changed +56
-5
lines changed Original file line number Diff line number Diff line change 1+ name : Check Versions
2+
3+ on :
4+ schedule :
5+ - cron : ' 0 * * * *'
6+
7+ env :
8+ DESTINATION_REPOSITORY : github/codeql-action
9+ SOURCE_REPOSITORY : ${{ github.repository }}
10+
11+ jobs :
12+ check :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout repository
16+ uses : actions/checkout@v2
17+
18+ - name : Compare The Latest Releases Between Two Repositories
19+ id : compare-releases
20+ uses : NickLiffen/compare-releases@v2.0.4
21+ with :
22+ destinationRepository : ${{ env.DESTINATION_REPOSITORY }}
23+ sourceRepository : ${{ env.SOURCE_REPOSITORY }}
24+ token : ${{ secrets.GH_TOKEN }}
25+
26+ - name : Get results
27+ run : |
28+ echo "The result is ${{ steps.compare-releases.outputs.repo }}"
29+ echo "The result is ${{ steps.compare-releases.outputs.tagName }}"
30+
31+ - name : Invoke Release Workflow
32+ if : ${{ steps.compare-releases.outputs.repo == env.DESTINATION_REPOSITORY }}
33+ uses : benc-uk/workflow-dispatch@v1
34+ with :
35+ workflow : release
36+ token : ${{ secrets.GH_TOKEN }}
37+ inputs : ' { "tagName": "${{ steps.compare-releases.outputs.tagName }}" }'
38+
Original file line number Diff line number Diff line change 1- name : Create and publish a Docker image
1+ name : release
22
33on :
4- push :
5- branches : ['main']
6- release :
7- types : [published]
4+ workflow_dispatch :
5+ inputs :
6+ tagName :
7+ description : ' Name to tag this release'
8+ required : true
89
910env :
1011 REGISTRY : ghcr.io
4142 push : true
4243 tags : ${{ steps.meta.outputs.tags }}
4344 labels : ${{ steps.meta.outputs.labels }}
45+
46+ - name : Get result
47+ run : |
48+ echo "The result is ${{ github.event.inputs.tagName }}"
49+
50+ - name : Publish Release
51+ uses : " marvinpinto/action-automatic-releases@latest"
52+ with :
53+ repo_token : " ${{ secrets.GH_TOKEN }}"
54+ automatic_release_tag : " ${{ github.event.inputs.tagName }}"
55+ prerelease : false
56+ title : " ${{ github.event.inputs.tagName }}"
You can’t perform that action at this time.
0 commit comments