-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enforce commit being associated to a tag. The tag must be committed by a member of the release team. In addition, the tag needs to be verified. Finally, triggering actor must also be a member of the release team.
- Loading branch information
Showing
6 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Verify a tagged commit | ||
name: Verify tagged commit | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
RELEASE_TEAM: | ||
required: true | ||
READ_ORG_TOKEN: | ||
required: true | ||
|
||
jobs: | ||
checks: | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
# Check triggering actor membership | ||
- name: Actor verification | ||
id: actor_check | ||
uses: morfien101/actions-authorized-user@4a3cfbf0bcb3cafe4a71710a278920c5d94bb38b | ||
with: | ||
username: ${{ github.triggering_actor }} | ||
org: ${{ github.repository_owner }} | ||
team: ${{ secrets.RELEASE_TEAM }} | ||
github_token: ${{ secrets.READ_ORG_TOKEN }} | ||
|
||
- name: Actor authorized | ||
run: | | ||
if [ "${{ steps.actor_check.outputs.authorized }}" == "false" ]; then | ||
echo "Actor '${{ github.triggering_actor }}' is not authorized to perform release" | ||
exit 1 | ||
fi |