File tree Expand file tree Collapse file tree 3 files changed +89
-0
lines changed
Expand file tree Collapse file tree 3 files changed +89
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build Docker Image
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ version :
7+ description : ' Semantic version to label the Docker image under'
8+ required : true
9+ type : string
10+
11+ jobs :
12+ check_authorization :
13+ name : Check authorization to publish new Docker image
14+ runs-on : ubuntu-latest
15+ outputs :
16+ isAuthorized : ${{ steps.check-auth.outputs.is_authorized }}
17+ steps :
18+ - name : check-auth
19+ id : check-auth
20+ run : echo "is_authorized=${{ contains(secrets.DEPLOYMENT_AUTHORIZED_USERS, github.triggering_actor) }}" >> $GITHUB_OUTPUT
21+ build :
22+ name : Build Docker image
23+ needs : check_authorization
24+ if : needs.check_authorization.outputs.isAuthorized == 'true'
25+ runs-on : ubuntu-latest
26+ steps :
27+ - name : Log in to GitHub Container Registry
28+ uses : docker/login-action@v2
29+ with :
30+ registry : ghcr.io
31+ username : ${{ github.actor }}
32+ password : ${{ secrets.GITHUB_TOKEN }}
33+ - name : Build and push
34+ uses : docker/build-push-action@v4
35+ with :
36+ push : true
37+ tags : ghcr.io/crosstalk-solutions/project-nomad-admin:${{ inputs.version }}
Original file line number Diff line number Diff line change 1+ name : Release SemVer
2+
3+ on : workflow_dispatch
4+
5+ jobs :
6+ check_authorization :
7+ name : Check authorization to release new version
8+ runs-on : ubuntu-latest
9+ outputs :
10+ isAuthorized : ${{ steps.check-auth.outputs.is_authorized }}
11+ steps :
12+ - name : check-auth
13+ id : check-auth
14+ run : echo "is_authorized=${{ contains(secrets.DEPLOYMENT_AUTHORIZED_USERS, github.triggering_actor) }}" >> $GITHUB_OUTPUT
15+ release :
16+ name : Release
17+ needs : check_authorization
18+ if : needs.check_authorization.outputs.isAuthorized == 'true'
19+ runs-on : ubuntu-latest
20+ outputs :
21+ didRelease : ${{ steps.semver.outputs.new_release_published }}
22+ newVersion : ${{ steps.semver.outputs.new_release_version }}
23+ steps :
24+ - name : Checkout
25+ uses : actions/checkout@v4
26+ with :
27+ fetch-depth : 0
28+ persist-credentials : false
29+ - name : semantic-release
30+ uses : cycjimmy/semantic-release-action@v3
31+ id : semver
32+ env :
33+ GITHUB_TOKEN : ${{ secrets.COSMISTACKBOT_ACCESS_TOKEN }}
34+ GIT_AUTHOR_NAME : cosmistack-bot
35+ GIT_AUTHOR_EMAIL : dev@cosmistack.com
36+ GIT_COMMITTER_NAME : cosmistack-bot
37+ GIT_COMMITTER_EMAIL : dev@cosmistack.com
Original file line number Diff line number Diff line change 1+ {
2+ "branches" : [" master" ],
3+ "plugins" : [
4+ " @semantic-release/commit-analyzer" ,
5+ " @semantic-release/release-notes-generator" ,
6+ [" @semantic-release/npm" , {
7+ "npmPublish" : false
8+ }],
9+ [" @semantic-release/git" , {
10+ "assets" : [" package.json" ],
11+ "message" : " chore(release): ${nextRelease.version} [skip ci]"
12+ }],
13+ " @semantic-release/github"
14+ ]
15+ }
You can’t perform that action at this time.
0 commit comments