-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (49 loc) · 2.12 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
on:
workflow_dispatch:
schedule:
- cron: '0 5 1 * *'
name: Update Yosys (and OSS Cad Suite)
# https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#workarounds-to-trigger-further-workflow-runs
jobs:
update:
name: Update OSS Cad Suite Version
strategy:
matrix:
branch: [main, next]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
# Yesterday, because CAD suite versions are made at the end of the
# night.
- name: Update OSS CAD Suite version file (and save new value)
run: |
date -d today +%Y-%m-%d > ci/oss-cad-suite-version
echo >> $GITHUB_ENV OSS_CAD_SUITE_DATE=$(cat ci/oss-cad-suite-version)
if [ ${{ github.event_name }} = "workflow_dispatch" ]; then
echo >> $GITHUB_ENV PR_REASON="Manual update"
else
echo >> $GITHUB_ENV PR_REASON="Monthly update"
fi
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.PAT }}
commit-message: Update OSS CAD Suite version to ${{ env.OSS_CAD_SUITE_DATE }}.
committer: GitHub <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: update-yosys-${{ env.OSS_CAD_SUITE_DATE }}-${{ matrix.branch }}
delete-branch: true
base: ${{ matrix.branch }}
title: Update OSS CAD Suite version to ${{ env.OSS_CAD_SUITE_DATE }}.
body: |
${{ env.PR_REASON }}; auto-generated by [create-pull-request][1].
[1]: https://github.com/peter-evans/create-pull-request
labels: |
automated pr
assignees: cr1901
draft: false