-
-
Notifications
You must be signed in to change notification settings - Fork 80
45 lines (39 loc) · 1.35 KB
/
cron_generate_pr.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
name: Generate PR when new golang versions released
on:
schedule:
- cron: '33 * * * *' # every hour at 33 minute past
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
ref: main
persist-credentials: false
- name: Get hash of current release JSON and exit if value is the same
run: |
rm -rf docker/go-1*
pip3 install jsonpath_ng
python3 generate_docker_images.py
- name: Get golang version
run: echo "value=$(cat .golang_version)" >> $GITHUB_OUTPUT
id: golang_version
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.PAT }}
signoff: false
branch: golang-${{ hashFiles('.golang_version') }}
commit-message: ${{ steps.golang_version.outputs.value }}
committer: GitHub <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
delete-branch: true
title: ${{ steps.golang_version.outputs.value }}
assignees: techknowlogick
reviewers: techknowlogick
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"