check last commit message (#5042)
This commit is contained in:
parent
58500e284f
commit
55faa80b28
|
@ -18,18 +18,26 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 2
|
||||||
|
|
||||||
|
- name: Check last date
|
||||||
|
run: if [ "$(git log -1 --pretty=%B)" = "Update date" ]; then echo "skip=true" >> $GITHUB_ENV; fi
|
||||||
|
|
||||||
- name: Install Tools
|
- name: Install Tools
|
||||||
|
if: ${{ env.skip != 'true' }}
|
||||||
working-directory: ./.github/workflows/
|
working-directory: ./.github/workflows/
|
||||||
run: |
|
run: |
|
||||||
sudo ./add-ubuntu-latest-apt-mirrors.sh
|
sudo ./add-ubuntu-latest-apt-mirrors.sh
|
||||||
sudo apt-get install subversion
|
sudo apt-get install subversion
|
||||||
|
|
||||||
- name: Update version header in git
|
- name: Update version header in git
|
||||||
|
if: ${{ env.skip != 'true' }}
|
||||||
working-directory: ./firmware/
|
working-directory: ./firmware/
|
||||||
run: bash update_version.sh
|
run: bash update_version.sh
|
||||||
|
|
||||||
- name: Write Date File
|
- name: Write Date File
|
||||||
|
if: ${{ env.skip != 'true' }}
|
||||||
run: |
|
run: |
|
||||||
echo -e -n "#pragma once\n#define VCS_DATE $(date "+%Y%m%d")\n" > ./firmware/controllers/date_stamp.h
|
echo -e -n "#pragma once\n#define VCS_DATE $(date "+%Y%m%d")\n" > ./firmware/controllers/date_stamp.h
|
||||||
git config --local user.email "action@github.com"
|
git config --local user.email "action@github.com"
|
||||||
|
@ -37,6 +45,7 @@ jobs:
|
||||||
git commit -m "Update date" -a 2>&1 | grep -E '(nothing to commit|changed)'
|
git commit -m "Update date" -a 2>&1 | grep -E '(nothing to commit|changed)'
|
||||||
|
|
||||||
- name: Push changed date file
|
- name: Push changed date file
|
||||||
|
if: ${{ env.skip != 'true' }}
|
||||||
uses: ad-m/github-push-action@master
|
uses: ad-m/github-push-action@master
|
||||||
with:
|
with:
|
||||||
github_token: ${{ github.token }}
|
github_token: ${{ github.token }}
|
||||||
|
|
Loading…
Reference in New Issue