chore(deps): bump node from 22.6.0-alpine to 22.7.0-alpine #156
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: Go version | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- Dockerfile | |
jobs: | |
version-sync: | |
name: Synchronise go-version | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Get Go version from Dockerfile | |
run: | | |
echo "GO_VERSION=$(grep 'FROM golang:' Dockerfile | cut -d ':' -f2 | cut -d '-' -f1 | tr -d '\n')" >> $GITHUB_ENV | |
- name: Synchronise Go version in actions | |
run: | | |
sed -i -E s/'([\ \t]+)go-version: .+'/'\1go-version: ${{ env.GO_VERSION }}'/g .github/workflows/* | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/[email protected] | |
with: | |
token: ${{ secrets.GH_REPO_TOKEN }} | |
author: "Łukasz Mierzwa <[email protected]>" | |
commit-message: "chore(actions): use latest Go version" | |
branch: version-sync-go | |
delete-branch: true | |
title: "chore(actions): use latest Go version" | |
- name: Check outputs | |
run: | | |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | |
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" | |
- name: Enable Pull Request Automerge | |
if: steps.cpr.outputs.pull-request-operation == 'created' | |
run: gh pr merge --merge --auto version-sync-go | |
env: | |
GH_TOKEN: ${{ secrets.GH_REPO_TOKEN }} |