-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (27 loc) · 924 Bytes
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: OnlyTesting
on:
workflow_dispatch:
jobs:
test:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
token: ${{ secrets.GIT_PAT }}
- name: Commit and push changes
run: |
cd ${{ github.workspace }}
git config --global user.name 'github-actions[bot]'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
git remote add origin_https https://${{ secrets.GIT_PAT }}@github.com/robertZaufall/ChocolateStoreCore.git
git fetch
$last_commit="$(git rev-parse HEAD)"
echo "$last_commit"
if ($last_commit -ne "${{ github.sha }}") {
echo "Check-in cancelled due to changes in the meantime."
exit 0
}
echo "Check-in might have been done."
env:
GIT_PAT: ${{ secrets.GIT_PAT }}