Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ssboisen committed Jan 18, 2021
0 parents commit 4d5b91a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 'Modify and reload vector config'
description: 'Modifies and reloads vector config in order to include appropriate fields for a particular CI run'
inputs:
test-type:
description: 'What type of test is being run?'
required: true
runs:
using: "composite"
steps:
- name: Rewrite vector configuration
shell: bash
run: |
sed \
-e 's/\$\$CI_JOB\$\$/${{github.job}}/' \
-e 's/\$\$CI_RUN_ID\$\$/${{github.run_id}}/' \
-e 's/\$\$CI_RUN_NUMBER\$\$/${{github.run_number}}/' \
-e 's/\$\$CI_SHA\$\$/${{github.sha}}/' -e 's|\$\$CI_REF\$\$|${{github.ref}}|' \
-e 's/\$\$CI_AUTHOR\$\$/${{github.actor}}/' -e 's/\$\$CI_TEST_TYPE\$\$/${{inputs.test-type}}/' \
/etc/vector/vector.toml.tmpl > /etc/vector/vector.toml
- name: Reload vector
shell: bash
run: sudo systemctl reload vector

0 comments on commit 4d5b91a

Please sign in to comment.