build(deps): bump ruby/setup-ruby from 1.215.0 to 1.216.0 #46
Workflow file for this run
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: Protobuf update | |
on: | |
pull_request: | |
types: [labeled] | |
permissions: {} | |
jobs: | |
my_job: | |
runs-on: ubuntu-latest | |
if: github.event.label.name == 'protobuf' | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
persist-credentials: true | |
- name: Update versions.mk with latest release version | |
run: | | |
export PROTOC_VERSION="$(awk -F'[:@]' '/FROM ghcr.io\/homebrew\/core\/protobuf/{print $2; exit}' protoc-builder/hack/Dockerfile.protobuf)" | |
echo "Detected protobuf v${PROTOC_VERSION}... computing digest of artifact" | |
export PROTOC_ZIP=$(mktemp) | |
curl -fsSL --retry 3 -o ${PROTOC_ZIP} https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip | |
export PROTOC_CHECKSUM="$(sha256sum ${PROTOC_ZIP} | awk '{print "sha256:"$1}')" | |
sed -i 's/^\(DEFAULT_PROTOC_VERSION\s*=\s*\).*/\1'v${PROTOC_VERSION}'/' protoc-builder/versions.mk | |
sed -i 's/^\(DEFAULT_PROTOC_CHECKSUM\s*=\s*\).*/\1'${PROTOC_CHECKSUM}'/' protoc-builder/versions.mk | |
- name: Amend Dependabot PR | |
env: | |
PULL_REQUEST_HEAD_REF: ${{ github.event.pull_request.head.ref }} | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git add -A | |
git commit -sam "Bumping default protoc version and checksum in versions.mk" | |
git push origin HEAD:${PULL_REQUEST_HEAD_REF} |