File tree Expand file tree Collapse file tree 6 files changed +34
-7
lines changed
Expand file tree Collapse file tree 6 files changed +34
-7
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,12 @@ name: "Major Version Updater"
33on :
44 workflow_call :
55 inputs :
6- tag_name :
6+ tag-name :
77 required : true
88 type : string
9+ secrets :
10+ github-token :
11+ required : true
912permissions :
1013 contents : read
1114jobs :
@@ -17,17 +20,19 @@ jobs:
1720 - uses : actions/checkout@v4.2.2
1821 with :
1922 fetch-tags : true
20- ref : ${{ inputs.tag_name }}
23+ ref : ${{ inputs.tag-name }}
2124 - name : version
2225 id : version
2326 env :
24- TAG_NAME : ${{ inputs.tag_name }}
27+ TAG_NAME : ${{ inputs.tag-name }}
2528 run : |
2629 tag=${TAG_NAME/refs\/tags\//}
2730 version=${tag#v}
2831 major=${version%%.*}
2932 { echo "tag=${tag}"; echo "version=${version}"; echo "major=${major}"; } >> "$GITHUB_OUTPUT"
3033 - name : force update major tag
34+ env :
35+ GITHUB_TOKEN : ${{ secrets.github-token }}
3136 run : |
3237 git tag -f v${{ steps.version.outputs.major }} ${{ steps.version.outputs.tag }}
3338 git push -f origin v${{ steps.version.outputs.major }}
Original file line number Diff line number Diff line change 3838 exit 1
3939 - name : Create an Announcement Discussion for Release
4040 uses : abirismyname/create-discussion@c2b7c825241769dda523865ae444a879f6bbd0e0
41- env :
42- GH_TOKEN : ${{ secrets.github-token }}
4341 with :
4442 title : ${{ inputs.full-tag }}
4543 body : ${{ inputs.body }}
4644 repository-id : ${{ env.DISCUSSION_REPOSITORY_ID }}
4745 category-id : ${{ env.DISCUSSION_CATEGORY_ID }}
46+ github-token : ${{ secrets.github-token }}
Original file line number Diff line number Diff line change 6969 subject-name : ${{ env.IMAGE_REGISTRY }}/${{ inputs.image-name}}
7070 subject-digest : ${{ steps.push.outputs.digest }}
7171 push-to-registry : true
72+ github-token : ${{ secrets.github-token }}
Original file line number Diff line number Diff line change 1616 contents : write
1717 uses : ./.github/workflows/major-version-updater.yaml
1818 with :
19- tag_name : ${{ github.event.inputs.TAG_NAME || github.ref}}
19+ tag-name : ${{ github.event.inputs.TAG_NAME || github.ref}}
20+ secrets :
21+ github-token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -4,8 +4,9 @@ This is a placeholder repo for multiple GitHub Actions we use in open source pro
44
55## Reusable Workflows Available
66
7- - [ Labeler] ( docs/labeler.md )
87- [ Auto-Labeler] ( docs/auto-labeler.md )
8+ - [ Labeler] ( docs/labeler.md )
9+ - [ Major Version Updater] ( docs/major-version-updater.md )
910- [ PR Title] ( docs/pr-title.md )
1011- [ Release] ( docs/release.md )
1112- [ Release Image] ( docs/release-image.md )
Original file line number Diff line number Diff line change 1+ # Major Version Updater
2+
3+ ## Inputs
4+
5+ ``` yaml
6+ - uses : github/ospo-reusable-workflows/.github/workflows/major-version-updater.yml@main
7+ permissions :
8+ contents : write
9+ with :
10+ # Tag name that the major tag will point to (e.g. v1.2.3)
11+ tag-name : v1.2.3
12+ secrets :
13+ # The GitHub token to use
14+ github-token : ${{ secrets.GITHUB_TOKEN }}
15+ ` ` `
16+
17+ ## Outputs
18+
19+ None
You can’t perform that action at this time.
0 commit comments