From 98cda4c119da0e9d0d626f85c98c721cdfb9010a Mon Sep 17 00:00:00 2001 From: mo-marqh <87382490+mo-marqh@users.noreply.github.com> Date: Wed, 4 Oct 2023 12:50:40 +0000 Subject: [PATCH] Create commitSpecs.yml framework for actions --- .github/workflows/commitSpecs.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/commitSpecs.yml diff --git a/.github/workflows/commitSpecs.yml b/.github/workflows/commitSpecs.yml new file mode 100644 index 0000000..904a054 --- /dev/null +++ b/.github/workflows/commitSpecs.yml @@ -0,0 +1,30 @@ +name: commitSpecs + +on: + pull_request + +jobs: + build: + + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} + - name: Install dependencies + run: | + echo "dependencies" + - name: Generate content and commit PR branch + run: | + date > thisdate + git add thisdate + if [ -z "$(git status --porcelain)" ]; + then echo 'nothing to commit' + else + git config --global user.email "${{ github.actor }}@users.noreply.github.com" + git config --global user.name "${{ github.actor }}" + git commit -am 'Github Action Commit' + git push origin HEAD:${{ github.head_ref }} + fi