Skip to content

Commit 96e0c83

Browse files
asadekasampmai
andauthored
Create remote_release.yml (#12)
Signed-off-by: Ahmed Sadek ahmed.sadek@asam.net Signed-off-by: Pierre R. Mai <pmai@pmsf.de> Co-authored-by: Pierre R. Mai <pmai@pmsf.de>
1 parent 90f3076 commit 96e0c83

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Remote Tagging
2+
3+
on:
4+
repository_dispatch:
5+
types: [update-tag]
6+
7+
permissions:
8+
contents: write
9+
repository-projects: write
10+
11+
jobs:
12+
submodule:
13+
name: Update submodule and create tag
14+
runs-on: Ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
20+
21+
- name: Update submodule
22+
run: |
23+
git submodule init
24+
git submodule update --recursive --remote
25+
cd open-simulation-interface
26+
git checkout ${{ github.event.client_payload.tag }}
27+
cd ..
28+
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
29+
git config --local user.name "github-actions[bot]"
30+
git add open-simulation-interface
31+
git commit -m "OSI submodule updated"
32+
continue-on-error: true
33+
34+
- name: Create tag
35+
run: git tag ${{ github.event.client_payload.tag }}
36+
37+
- name: GitHub Push
38+
uses: ad-m/github-push-action@v0.6.0
39+
with:
40+
# Token for the repo. Can be passed in using $\{{ secrets.GITHUB_TOKEN }}
41+
github_token: ${{ secrets.MACHINE_USER_PAT }}
42+
# Determines if --tags is used
43+
tags: true
44+
force: true

0 commit comments

Comments
 (0)