forked from The-OpenROAD-Project/OpenROAD-flow-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (41 loc) · 1.38 KB
/
github-actions-cron-update-yosys.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
36
37
38
39
40
41
42
name: Create draft PR for updated YOSYS submodule
on:
push:
schedule:
- cron: "0 8 * * MON"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Check out repository code recursively
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Pull changes in yosys submodule
id: remote-update
run: |
cd tools/yosys
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git config --get remote.origin.fetch
git fetch --all --tags
latesttag=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "::set-output name=has_update::$(git --no-pager diff --name-only ${latesttag}..HEAD)"
git checkout ${latesttag}
- if: "steps.remote-update.outputs.has_update != ''"
name: Create Draft PR
uses: peter-evans/create-pull-request@v6
with:
token: ${{ github.token }}
signoff: true
delete-branch: true
title: 'Update yosys submodule'
reviewers: |
habibayassin
draft: true
branch: update-yosys
commit-message: |
[BOT] Update yosys submodule