-
Notifications
You must be signed in to change notification settings - Fork 5
35 lines (33 loc) · 1.17 KB
/
test-with-example.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
name: Test with example
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set new submodule in new branch on Osuny Example
uses: actions/checkout@v4
with:
repository: osunyorg/example
submodules: 'recursive'
token: ${{ secrets.OSUNY_EXAMPLE_TOKEN }}
- name: Create new branch on Example
run: |
git config user.name osuny-bot
git config user.email [email protected]
echo "== Creating new branch =="
git checkout -b theme--${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
- name: Checkout submodule
uses: actions/checkout@v4
with:
repository: osunyorg/theme
token: ${{ secrets.OSUNY_EXAMPLE_TOKEN }}
path: themes/osuny
ref: ${{ github.head_ref || github.ref_name }}
- name: Pushing new branch on Example
run: |
echo "== Pushing branch =="
git add .
git commit -m "Updated theme to ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} branch."
git push -f origin theme--${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}