File tree Expand file tree Collapse file tree 2 files changed +61
-5
lines changed
Expand file tree Collapse file tree 2 files changed +61
-5
lines changed Original file line number Diff line number Diff line change 88 branches :
99 - main
1010 types : [ opened, synchronize, reopened ]
11+ workflow_call :
12+ inputs :
13+ tag :
14+ type : string
15+ default : ' latest'
1116
1217permissions :
1318 contents : read
@@ -33,18 +38,18 @@ jobs:
3338 with :
3439 context : .
3540 push : ${{ github.event_name == 'push' }}
36- tags : crenshawdotdev/argocd-executor-plugin:latest
41+ tags : crenshawdotdev/argocd-executor-plugin:${{ inputs.tag }}
3742 - name : Install cosign
3843 uses : sigstore/cosign-installer@main
3944 with :
4045 cosign-release : ' v1.13.0'
41- if : ${{ github.event_name == 'push' }}
42- - name : Sign latest image
46+ if : ${{ github.event_name == 'push' || github.event_name == 'workflow_call' }}
47+ - name : Sign ${{ inputs.tag }} image
4348 run : |
44- cosign sign --key env://COSIGN_PRIVATE_KEY crenshawdotdev/argocd-executor-plugin:latest
49+ cosign sign --key env://COSIGN_PRIVATE_KEY crenshawdotdev/argocd-executor-plugin:${{ inputs.tag }}
4550 # Displays the public key to share.
4651 cosign public-key --key env://COSIGN_PRIVATE_KEY
4752 env :
4853 COSIGN_PRIVATE_KEY : ${{secrets.COSIGN_PRIVATE_KEY}}
4954 COSIGN_PASSWORD : ${{secrets.COSIGN_PASSWORD}}
50- if : ${{ github.event_name == 'push' }}
55+ if : ${{ github.event_name == 'push' || github.event_name == 'workflow_call' }}
Original file line number Diff line number Diff line change 1+ name : Create argocd-executor-plugin release
2+ on :
3+ workflow_dispatch :
4+ inputs :
5+ tag :
6+ required : true
7+
8+ permissions :
9+ contents : read
10+
11+ jobs :
12+ build-and-push :
13+ uses : crenshaw-dev/argocd-executor-plugin/.github/workflows/build.yaml@main
14+ with :
15+ tag : ${{ github.event.inputs.tag }}
16+ if : github.repository == 'crenshaw-dev/argocd-executor-plugin'
17+ prepare-release :
18+ permissions :
19+ contents : write # To push changes to release branch
20+ name : Release
21+ if : github.repository == 'crenshaw-dev/argocd-executor-plugin'
22+ runs-on : ubuntu-22.04
23+ env :
24+ GIT_USERNAME : crenshaw-dev
25+ GIT_EMAIL : 350466+crenshaw-dev@users.noreply.github.com
26+ RELEASE_TAG : ${{ github.event.inputs.tag }}
27+ steps :
28+ - name : Checkout code
29+ uses : actions/checkout@v3
30+ with :
31+ fetch-depth : 0
32+ token : ${{ secrets.GITHUB_TOKEN }}
33+
34+ - name : Push release tag
35+ run : |
36+ set -ue
37+
38+ git config --global user.email "${GIT_EMAIL}"
39+ git config --global user.name "${GIT_USERNAME}"
40+
41+ git tag ${RELEASE_TAG}
42+ git push origin ${RELEASE_TAG}
43+
44+ - name : Create GitHub release
45+ uses : softprops/action-gh-release@v1
46+ env :
47+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
48+ with :
49+ name : ${{ env.RELEASE_TAG }}
50+ tag_name : ${{ env.RELEASE_TAG }}
51+ generate_release_notes : true
You can’t perform that action at this time.
0 commit comments