-
Notifications
You must be signed in to change notification settings - Fork 2
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
61 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | ||
|
||
name: Auto commit client updates | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ "**" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
cache: maven | ||
|
||
- name: Set git user and generate files | ||
run: | | ||
git config --global user.name 'equinix-labs@auto-commit-workflow' | ||
git config --global user.email '[email protected]' | ||
git config advice.addIgnoredFile false | ||
git fetch | ||
echo -e "\nThis is executing for branch: ${GITHUB_REF##*/}." | ||
git checkout ${GITHUB_REF##*/} | ||
make generate | ||
- name: Commit to branch. | ||
run: | | ||
git add . | ||
echo -e "\nGit status:" | ||
echo `git status` | ||
cdate=`date` | ||
cmsg="Auto commit generated client changes - $cdate" | ||
echo -e "\nCommit message created : $cmsg" | ||
echo -e "\nCommitting if there are files to update in client dir:" | ||
echo `git commit -m "$cmsg"` | ||
echo `git push` |
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