-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
56 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: prashan testing new action | ||
on: | ||
pull_request_target: | ||
types: [opened, synchronize, reopened] | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
update_version: | ||
runs-on: macos-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
# Fetch full depth, otherwise the last step overwrites the last commit's parent, essentially removing the graph. | ||
fetch-depth: 0 | ||
token: ${{ secrets.BOT_PAT }} | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Run bump_version_gh_action.sh | ||
id: bump-version | ||
run: | | ||
set +e | ||
./bump_version_gh_action.sh | ||
echo "bump_version_ret=$?" >> $GITHUB_OUTPUT | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BOT_PAT }} | ||
|
||
- name: Import bot's GPG key for signing commits | ||
id: import-gpg | ||
uses: crazy-max/ghaction-import-gpg@v6 | ||
with: | ||
gpg_private_key: ${{ secrets.BOT_GPG_PRIVATE_KEY }} | ||
passphrase: ${{ secrets.BOT_GPG_PASSPHRASE }} | ||
#git_config_global: true | ||
git_user_signingkey: true | ||
git_commit_gpgsign: true | ||
|
||
- name: Sign commit and push changes | ||
run: | | ||
if [[ "${{ steps.bump-version.outputs.bump_version_ret }}" == "0" ]]; then | ||
git config --global user.email ${{ steps.import-gpg.outputs.name }} | ||
git config --global user.name ${{ steps.import-gpg.outputs.email }} | ||
git commit -S -m "Bump version" build.gradle.kts | ||
git push | ||
fi | ||
env: | ||
# GITHUB_TOKEN: ${{ secrets.BOT_PAT }} | ||
GIT_AUTHOR_NAME: ${{ steps.import-gpg.outputs.name }} | ||
GIT_AUTHOR_EMAIL: ${{ steps.import-gpg.outputs.email }} | ||
GIT_COMMITTER_NAME: ${{ steps.import-gpg.outputs.name }} | ||
GIT_COMMITTER_EMAIL: ${{ steps.import-gpg.outputs.email }} | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/sh | ||
|
||
printenv | ||
echo | ||
|
||
vercomp () { | ||
if [[ $1 == $2 ]] | ||
|