-
Notifications
You must be signed in to change notification settings - Fork 9
50 lines (47 loc) · 1.65 KB
/
UpdateCofhe.yaml
File metadata and controls
50 lines (47 loc) · 1.65 KB
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
42
43
44
45
46
47
48
49
50
name: Send submodule updates to parent repo
on:
push:
branches:
- master
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: fhenixprotocol/cofhe
token: ${{ secrets.GH_PAT_LIOR }}
submodules: true
- name: Pull & update submodules
run: |
git submodule update --init
git submodule update --remote cofhe-contracts
- name: Commit
run: |
git config user.email "actions@github.com"
git config user.name "GitHub Actions - update submodules"
git add --all
git commit -m "Update submodules" || echo "No changes to commit"
- name: Parse GH Commit Hash
shell: bash
run: |
cd cofhe-contracts && echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
- name: Create Pull Request
id: cpr
continue-on-error: true
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GH_PAT_LIOR }}
commit-message: Updated Submodule from cofhe-contracts
committer: GitHub <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: cofhe-contracts-${{ env.sha_short }}
delete-branch: true
title: 'Update Submodule from cofhe-contracts'
body: |
Updated submodule from cofhe-contracts push to [master](https://github.com/fhenixprotocol/cofhe-contracts/commit/${{ github.sha }})
labels: |
report
automated pr
draft: false