Fix code scanning alert #11: Use of Kernel.open
or IO.read
or similar sinks with a non-constant value
#3
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: Create Tag Version on Bump Merge | |
on: | |
pull_request: | |
types: [closed] | |
jobs: | |
version_bump: | |
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'version-bump-2.221.0-') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Read gem version | |
id: read_version | |
run: | | |
gemspec_file=$(ls *.gemspec) | |
version=$(grep -E "spec.version\s*=\s*['\"][0-9]+\.[0-9]+\.[0-9]+['\"]" $gemspec_file | grep -o -E "[0-9]+\.[0-9]+\.[0-9]+") | |
echo "version=$version" >> $GITHUB_ENV | |
- name: Create Tag | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git tag -a v${{ env.version }} -m "Version ${{ env.version }}" | |
git push origin --tags |