https://github.com/guillaumefalourd/replace-values-action
Github Action to replace values in a specific file :octocat:
https://github.com/guillaumefalourd/replace-values-action
all-os-supported github-actions
Last synced: about 1 month ago
JSON representation
Github Action to replace values in a specific file :octocat:
- Host: GitHub
- URL: https://github.com/guillaumefalourd/replace-values-action
- Owner: GuillaumeFalourd
- License: apache-2.0
- Created: 2023-06-13T15:57:42.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-20T12:13:45.000Z (over 2 years ago)
- Last Synced: 2025-01-31T08:35:28.453Z (8 months ago)
- Topics: all-os-supported, github-actions
- Language: Shell
- Homepage: https://github.com/marketplace/actions/replace-value-s
- Size: 30.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Replace Values Action
[](https://github.com/GuillaumeFalourd/replace-values-action/actions/workflows/ubuntu_action_test.yml) [](https://github.com/GuillaumeFalourd/replace-values-action/actions/workflows/macos_action_test.yml) [](https://github.com/GuillaumeFalourd/replace-values-action/actions/workflows/windows_action_test.yml)
☞ GitHub Action to replace values in a specific file :octocat:
## 📚 Usage
### Simple value
```yaml
- name: Replace simple value in a specific file
uses: GuillaumeFalourd/replace-values-action@v1.1
with:
file_path: ./path/to/file
parameters: value1 >> value2
```### Multiline values
```yaml
- name: Replace multiple values in a specific file
uses: GuillaumeFalourd/replace-values-action@v1.1
with:
file_path: ./path/to/file
parameters: |
current_value_1 >> new_value_1
current_value_2 >> new_value_2
```## ▶️ Action Inputs
Field | Mandatory | Observation
------------ | ------------ | -------------
**file_path** | YES | Path to the file to update.
**parameters** | YES | `value_to_replace >> new_value` (can be an array).## 🗂 Changelog
### `@v1`
This version performs a split for the `::` informed in each line of the `parameters` input, to identify the `old value` to replace and the `new value` to set instead.
### `@v1.1`
This version performs a split for the `>>` informed in each line of the `parameters` input, to identify the `old value` to replace and the `new value` to set instead.
## 🤝 Contributing
☞ If you're interested in contributing to this repository, please follow the [guidelines](https://github.com/GuillaumeFalourd/replace-values-action/blob/main/CONTRIBUTING.md)
## 🏅 Licensed
☞ This repository uses the [Apache License 2.0](https://github.com/GuillaumeFalourd/replace-values-action/blob/main/LICENSE)