Skip to content

Commit

Permalink
refactor: drop unnecessary curly braces from if statements
Browse files Browse the repository at this point in the history
  • Loading branch information
favna committed Aug 19, 2024
1 parent 53f2a35 commit e3483c1
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/reusable-codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
languages: typescript

- name: Autobuild
if: ${{ inputs.with-auto-build }}
if: inputs.with-auto-build
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-continuous-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
with:
node-version: ${{ inputs.node-version }}
- name: Build
if: ${{ inputs.build }}
if: inputs.build
run: yarn build
- name: Bump Version & Publish
working-directory: ${{ inputs.working-directory}}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/reusable-documentation-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,33 +78,33 @@ jobs:
submodules: ${{ inputs.with-submodules }}

- name: Extract Package and Semver
if: ${{ inputs.type == 'tag' && inputs.mono-repo == true }}
if: inputs.type == 'tag' && inputs.mono-repo == true
id: extract-tag
uses: sapphiredev/.github/actions/format-tag@main
with:
tag: ${{ inputs.name }}

#region Move [Mono Repo]
- name: Move Documentation [Mono Repo Tag]
if: ${{ inputs.mono-repo == true && inputs.type == 'tag' && inputs.package == steps.extract-tag.outputs.package }}
if: inputs.mono-repo == true && inputs.type == 'tag' && inputs.package == steps.extract-tag.outputs.package
run: |
mkdir -p out/docs/${{ inputs.project-name }}/${{ steps.extract-tag.outputs.package }}
mv docs/${{ steps.extract-tag.outputs.package }}/docs/api.json out/docs/${{ inputs.project-name }}/${{ steps.extract-tag.outputs.package }}/${{ steps.extract-tag.outputs.semver }}.json
- name: Move Documentation [Mono Repo Branch]
if: ${{ inputs.mono-repo == true && inputs.type == 'branch' }}
if: inputs.mono-repo == true && inputs.type == 'branch'
run: |
mkdir -p out/docs/${{ inputs.project-name }}/${{ inputs.package }}
mv docs/${{ inputs.package }}/docs/api.json out/docs/${{ inputs.project-name }}/${{ inputs.package }}/${{ inputs.name }}.json
#endregion

#region Move [Regular Repo]
- name: Move Documentation [Regular Repo Tag]
if: ${{ inputs.mono-repo == false && inputs.type == 'tag' }}
if: inputs.mono-repo == false && inputs.type == 'tag'
run: |
mkdir -p out/${{ inputs.project-name }}
mv docs/api.json out/docs/${{ inputs.project-name }}/${{ inputs.name }}.json
- name: Move Documentation [Regular Repo Branch]
if: ${{ inputs.mono-repo == false && inputs.type == 'branch' }}
if: inputs.mono-repo == false && inputs.type == 'branch'
run: |
mkdir -p out/${{ inputs.project-name }}
mv docs/api.json out/docs/${{ inputs.project-name }}/${{ inputs.name }}.json
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/reusable-labelsync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
repository: sapphiredev/.github
submodules: ${{ inputs.with-submodules }}
- name: Checkout Overwrite Labels
if: ${{ inputs.merge-labels == true }}
if: inputs.merge-labels == true
uses: actions/checkout@v4
with:
path: overwrite-labels
Expand All @@ -46,11 +46,11 @@ jobs:
repository: ${{ inputs.repository-overwrite-labels }}
submodules: ${{ inputs.with-submodules }}
- name: Merge labels
if: ${{ inputs.merge-labels == true }}
if: inputs.merge-labels == true
run: |
yq '. *+ load("core-labels/.github/labels.yml")' overwrite-labels/.github/labels.yml > labels.yml
- name: Move core labels
if: ${{ inputs.merge-labels == false }}
if: inputs.merge-labels == false
run: mv core-labels/.github/labels.yml labels.yml
- name: Run Label Sync
uses: crazy-max/ghaction-github-labeler@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
GITHUB_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build
if: ${{ inputs.build }}
if: inputs.build
run: yarn build
- name: Bump Versions and make release
working-directory: ${{ inputs.working-directory }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
with:
node-version: ${{ inputs.node-version }}
- name: Build
if: ${{ inputs.build }}
if: inputs.build
run: yarn build
- name: Run job
run: yarn test
Expand Down

0 comments on commit e3483c1

Please sign in to comment.