CI: fix release pr target (#90999)

* use inputs.target as checkout ref, and `main` for all reused actions.
This commit is contained in:
Kevin Minehart
2024-07-25 16:14:29 -05:00
committed by GitHub
parent 3137410f3f
commit 2fe506d502
3 changed files with 17 additions and 24 deletions

View File

@@ -7,21 +7,6 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions-ecosystem/action-regex-match@v2.0.2
if: ${{ github.event.inputs.version != '' }}
id: regex-match
with:
text: ${{ github.event.inputs.version }}
# https://semver.org/
regex: '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$'
- name: Validate input version
if: ${{ steps.regex-match.outputs.match == '' && github.event.inputs.version != '' }}
shell: bash
run: |
echo "The input version format is not correct, please respect:\
major.minor.patch, major.minor.patch-preview or major.minor.patch-preview<number> format. \
example: 7.4.3, 7.4.3-preview or 7.4.3-preview1"
exit 1
- uses: actions/setup-go@v4
with:
go-version-file: go.mod