Skip to content

Commit

Permalink
Print Go Version in each pr
Browse files Browse the repository at this point in the history
  • Loading branch information
upadhyeammit committed Jan 4, 2024
1 parent ed412b9 commit 579cc6b
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/print_go_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Print go version from ubi8/go-toolset:latest image

on:
pull_request:
branches: [main]

jobs:
print_go_version:

runs-on: ubuntu-latest

permissions:
pull-requests: write

steps:
- name: Pull the regctl command
run: |
curl -L https://github.com/regclient/regclient/releases/latest/download/regctl-linux-amd64 > regctl
chmod 755 regctl
- name: Print GO Version used in ubi8/go-toolset:latest image
run: |
echo "GO_VERSION_DETAILS=$(./regctl image config registry.access.redhat.com/ubi8/go-toolset:latest|grep "\"GO_MAJOR_VERSION\|\"GO_MINOR_VERSION\|\"GO_PATCH_VERSION\|\"VERSION="|tr -cd "[:alnum:]|\n|=|_|.")" >> $GITHUB_ENV
- uses: thollander/actions-comment-pull-request@v2
with:
message: |
echo "Go Version Details:"
echo
echo "${{ env.GO_VERSION_DETAILS }}""

0 comments on commit 579cc6b

Please sign in to comment.