Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Add commit author verification
Browse files Browse the repository at this point in the history
  • Loading branch information
ILIYANGERMANOV committed Jul 7, 2024
1 parent 39b94f7 commit b729127
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/internal_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,22 @@ on:
jobs:
google_play_release:
if: |
github.actor == 'github-actions[bot]' &&
contains(github.event.head_commit.message, 'Automatic release')
runs-on: ubuntu-latest

steps:
- name: Checkout GIT
uses: actions/checkout@v4

- name: Verify Commit Author
id: verify_author
run: |
AUTHOR=$(git log -1 --pretty=format:'%an')
if [ "$AUTHOR" != "github-actions[bot]" ]; then
echo "Commit not authored by github-actions[bot], exiting."
exit 1
fi
- name: Setup Java SDK
uses: actions/setup-java@v4
with:
Expand Down Expand Up @@ -81,7 +89,6 @@ jobs:

github_release:
if: |
github.actor == 'github-actions[bot]' &&
contains(github.event.head_commit.message, 'Automatic release')
runs-on: ubuntu-latest
permissions:
Expand All @@ -93,6 +100,15 @@ jobs:
with:
fetch-depth: 0 # Fetch all history for all branches and tags

- name: Verify Commit Author
id: verify_author
run: |
AUTHOR=$(git log -1 --pretty=format:'%an')
if [ "$AUTHOR" != "github-actions[bot]" ]; then
echo "Commit not authored by github-actions[bot], exiting."
exit 1
fi
- name: Setup Java SDK
uses: actions/setup-java@v4
with:
Expand Down

0 comments on commit b729127

Please sign in to comment.