feat(config): Add workflow for the automatic config conversion #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: Automatic conversion of application.yml to ors-config.yml | |
on: | |
pull_request: | |
branches: | |
- main | |
- releases/** | |
- feat/config-cleanup-finalize # for testing | |
types: [ ready_for_review, synchronize ] | |
workflow_dispatch: | |
jobs: | |
detect_config_change: | |
name: Detect and commit config changes | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Convert application.yml to ors-config.yml | |
run: | | |
./github/workflows/config-conversion-automation.yml ors-api/src/main/resources/application.yml ors-api/ors-config.yml | |
- name: Check with git if ors-api/ors-config.yml has changed | |
id: git-check | |
run: | | |
git diff --exit-code --name-only ors-api/ors-config.yml | |
echo "::set-output name=has_changed::$(test $? -eq 1)" | |
- uses: stefanzweifel/git-auto-commit-action@v5 | |
if: steps.git-check.outputs.has_changed == 'true' | |
with: | |
commit_message: 'chore(config): automatic conversion of application.yml to ors-config.yml' |