Update create_rel_tag.yml #1
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: Update Params.env with New Release Tags | |
# Trigger the create release workflow | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
update-params-env: | |
runs-on: ubuntu-latest | |
outputs: | |
param_env: ${{ steps.read_params_env.outputs.params_env }} | |
release_version: ${{ steps.get_release_version.outputs.release_version }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Read params.env | |
id: read_params_env | |
run: | | |
echo "params_env=$(cat /config/params.env)" >> $GITHUB_OUTPUT | |
- name: Read release version | |
id: get_release_version | |
run: echo "release_version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
- name: Update params.env with new release version | |
run: | | |
sed -i "s/:v[0-9.]*$/:${{ steps.get_release_version.outputs.release_version }}/g" /config/params.env | |
- name: Commit changes | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Actions" | |
git add /config/params.env | |
git commit -m "Update params.env with new release tags [${{ steps.get_release_version.outputs.release_version }}]" | |
git push |