[Actions] Updated .github/workflows/oss-scorecared.yml #1587
This file contains hidden or 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
--- # Reformatting Yaml | |
name: "Standardise: YAML format" | |
on: | |
push: | |
branches-ignore: | |
- "release/*" | |
- "hotfix/*" | |
paths: | |
- '**.yml' | |
- '**.yaml' | |
- '.github/workflows/reformat-yaml.yml' | |
concurrency: | |
group: ${{github.workflow}}-${{github.ref}} | |
cancel-in-progress: true | |
permissions: | |
contents: write | |
jobs: | |
standardise-yaml-files: | |
if: |- | |
github.event.pull_request.draft == false | |
&& ( !startsWith(github.head_ref, 'release/') | |
&& !startsWith(github.head_ref, 'hotfix/') ) | |
&& github.actor != 'dependabot[bot]' | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Initialise Workspace" | |
if: startsWith(runner.name, 'buildagent-') | |
shell: bash | |
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" | |
- name: "Set Active Environment" | |
shell: bash | |
run: | | |
{ | |
echo "ACTIVE_RUNNER_NAME=${{runner.name}}" | |
echo "ACTIVE_HOSTNAME=$HOSTNAME" | |
echo "ACTIVE_USER=$USER" | |
} >> "$GITHUB_ENV" | |
- name: "Checkout Source" | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
token: ${{secrets.SOURCE_PUSH_TOKEN}} | |
- name: "Reformat" | |
uses: credfeto/[email protected] | |
- name: "Commit Changes" | |
uses: stefanzweifel/[email protected] | |
with: | |
commit_message: "[Reformat] YAML Files to common format" | |
file_pattern: "*.yml" | |
commit_user_name: "fun-ymlfmt[bot]" | |
commit_user_email: "[email protected]" | |
commit_author: "fun-ymlfmt[bot] <[email protected]>" | |
skip_dirty_check: false |