Skip to content

Commit 783133f

Browse files
authored
Update and rename examples.yml to orphan.yml
1 parent 7a60037 commit 783133f

File tree

2 files changed

+27
-80
lines changed

2 files changed

+27
-80
lines changed

.github/workflows/examples.yml

Lines changed: 0 additions & 80 deletions
This file was deleted.

.github/workflows/orphan.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: generate empty branch
2+
3+
on:
4+
repository_dispatch:
5+
workflow_dispatch:
6+
push:
7+
branches: orphan
8+
9+
jobs:
10+
empty_branch:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
ref: main
16+
- name: Create new empty firmware branch
17+
run: |
18+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
19+
git config user.name "github-actions[bot]"
20+
git switch --orphan new_branch # create empty branch
21+
git commit --allow-empty -m "Initial commit"
22+
git push -u origin new_branch # push empty branch in repo
23+
git switch firmware
24+
git reset --hard new_branch # reset firmware branch
25+
git push origin firmware -f
26+
git push origin --delete new_branch # delete empty_branch
27+

0 commit comments

Comments
 (0)