Skip to content

Commit 8c2ffe8

Browse files
committed
Add workflows
1 parent 66875f3 commit 8c2ffe8

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: "Deploy"
2+
3+
on: [push, workflow_dispatch]
4+
5+
jobs:
6+
deploy:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Deploy
10+
run: |
11+
echo "Deploying..."

.github/workflows/update-other.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "Update other"
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
update-other:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Update other branch
11+
uses: actions/github-script@v5
12+
with:
13+
script: |
14+
github.rest.git.updateRef({
15+
owner: context.repo.owner,
16+
repo: context.repo.repo,
17+
ref: 'heads/other',
18+
sha: context.sha,
19+
})
20+
21+
# If e.g. you have a deploy workflow that should be triggered
22+
# on the 'other' branch when it is pushed to.
23+
- name: Trigger deploy workflow
24+
uses: actions/github-script@v5
25+
with:
26+
script: |
27+
github.rest.actions.createWorkflowDispatch({
28+
owner: context.repo.owner,
29+
repo: context.repo.repo,
30+
workflow_id: 'deploy.yml',
31+
ref: 'other',
32+
})

0 commit comments

Comments
 (0)