Generate PR when new golang versions released #33214
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}" |