Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#18 autoversioning #19

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Update Version

on:
pull_request:

jobs:
update-version:
runs-on: ubuntu-latest

steps:
- name: Checkout Repo
uses: actions/checkout@v2

- name: Update Script
run: |
# Extract the new version number
NEW_VERSION=$(echo ${{ github.event.release.tag_name }})
# Update the script with the new version
sed -i "s/VERSION=.*/VERSION=$NEW_VERSION/" /home/runner/work/ze-fluentd-plugin/ze-fluentd-plugin/install_collector.sh
echo "Set new version to $NEW_VERSION"

- name: Commit and Push
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -am "Update script version to $NEW_VERSION"
git push origin HEAD:#18_autoversioning

Loading