From e3483c18d87815de628f22ffa54536679667424a Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Mon, 19 Aug 2024 20:57:57 +0200 Subject: [PATCH] refactor: drop unnecessary curly braces from if statements --- .github/workflows/reusable-codeql.yml | 2 +- .github/workflows/reusable-continuous-delivery.yml | 2 +- .github/workflows/reusable-documentation-upload.yml | 10 +++++----- .github/workflows/reusable-labelsync.yml | 6 +++--- .github/workflows/reusable-publish.yml | 2 +- .github/workflows/reusable-tests.yml | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/reusable-codeql.yml b/.github/workflows/reusable-codeql.yml index 6a49385..14f3b51 100644 --- a/.github/workflows/reusable-codeql.yml +++ b/.github/workflows/reusable-codeql.yml @@ -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 diff --git a/.github/workflows/reusable-continuous-delivery.yml b/.github/workflows/reusable-continuous-delivery.yml index f3b0df8..7c2e272 100644 --- a/.github/workflows/reusable-continuous-delivery.yml +++ b/.github/workflows/reusable-continuous-delivery.yml @@ -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}} diff --git a/.github/workflows/reusable-documentation-upload.yml b/.github/workflows/reusable-documentation-upload.yml index 5d337d7..818db41 100644 --- a/.github/workflows/reusable-documentation-upload.yml +++ b/.github/workflows/reusable-documentation-upload.yml @@ -78,7 +78,7 @@ 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: @@ -86,12 +86,12 @@ jobs: #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 @@ -99,12 +99,12 @@ jobs: #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 diff --git a/.github/workflows/reusable-labelsync.yml b/.github/workflows/reusable-labelsync.yml index 243e127..5109501 100644 --- a/.github/workflows/reusable-labelsync.yml +++ b/.github/workflows/reusable-labelsync.yml @@ -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 @@ -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 diff --git a/.github/workflows/reusable-publish.yml b/.github/workflows/reusable-publish.yml index 7551cbf..8a0c237 100644 --- a/.github/workflows/reusable-publish.yml +++ b/.github/workflows/reusable-publish.yml @@ -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 }} diff --git a/.github/workflows/reusable-tests.yml b/.github/workflows/reusable-tests.yml index e8ddb40..1202a9a 100644 --- a/.github/workflows/reusable-tests.yml +++ b/.github/workflows/reusable-tests.yml @@ -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