Skip to content

Open Go Update PR

Open Go Update PR #63

Workflow file for this run

name: Open Go Update PR
on:
workflow_dispatch:
inputs:
go_version:
description: 'Go version'
required: true
type: string
open_pr:
description: 'Whether to open a PR'
required: false
type: boolean
default: true
draft:
description: 'Open a Draft PR'
required: false
type: boolean
default: false
branch:
description: 'Git branch to use (defaults to "gobot/go-update-<go_version>")'
required: false
type: string
default: ''
permissions: {}
env:
BRANCH_NAME: ${{ inputs.branch || format('gobot/go-update-{0}', inputs.go_version) }}
jobs:
open-go-update-pr:
runs-on: ubuntu-latest
permissions:
contents: write # push commit and branch
pull-requests: write # create PR
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.head_ref }}
- name: Setup Python and pip
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
with:
python-version: "3.12"
- name: Install dependencies
run: |
DDA_VERSION=$(grep DDA_VERSION dda.env | awk -F= '/^DDA_VERSION=/ {print $2}')
python3 -m pip install "git+https://github.com/DataDog/datadog-agent-dev.git@${DDA_VERSION}"
python3 -m dda -v self dep sync -f legacy-build
- name: Update Go version
run: |
dda run update go "${{ inputs.go_version }}" --check-archive
- name: Create Pull Request
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
if: ${{ inputs.open_pr }}
with:
commit-message: "[push_to_datadog_agent] Update go version to ${{ inputs.go_version }}"
branch: ${{ env.BRANCH_NAME }}
sign-commits: true
title: "Update Go version to ${{ inputs.go_version }}"
body: |
## Update docker images to Go ${{ inputs.go_version }}',
For more information about this version, see the [Go release notes](https://golang.org/doc/devel/release.html#go${{ inputs.go_version }}) and the [Github milestone](https://github.com/golang/go/issues?q=milestone%3AGo${{ inputs.go_version }}+label%3ACherryPickApproved)
draft: ${{ inputs.draft }}