-
Notifications
You must be signed in to change notification settings - Fork 24
41 lines (35 loc) · 1.12 KB
/
create-test-branch.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
35
36
37
38
39
40
41
name: Create CDS Test branch
on:
workflow_call:
jobs:
build:
runs-on: ubuntu-latest
name: Build and Push
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.TECH_USER_TOKEN }}
- name: Copy xmpls
run: |
npm run add-all-xmpls
rm -rf xmpls
- name: Test
run: |
npm i
npm test -- --colors
- name: Extract last commit author email and name
id: extract_commit_info
run: |
LAST_COMMIT_EMAIL=$(git log -1 --pretty=format:'%ae')
LAST_COMMIT_NAME=$(git log -1 --pretty=format:'%an')
echo "AUTHOR_EMAIL=$LAST_COMMIT_EMAIL" >> $GITHUB_ENV
echo "AUTHOR_NAME=$LAST_COMMIT_NAME" >> $GITHUB_ENV
- name: Push
run: |
git config --global user.email "${{ env.AUTHOR_EMAIL }}"
git config --global user.name "${{ env.AUTHOR_NAME }}"
# Add and commit changes locally
git add .
git commit -m "${{ github.event.head_commit.message }}"
git push --force-with-lease origin HEAD:cds-test-integrate