From 750146c4c659dbc942888660846ab21207df6a64 Mon Sep 17 00:00:00 2001 From: tomjo Date: Fri, 10 Nov 2023 17:25:20 +0100 Subject: [PATCH] build: consistent if clauses --- .github/workflows/build.yaml | 2 +- .github/workflows/determine_version.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b0719b0..d2d91ce 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -96,7 +96,7 @@ jobs: - name: Rename jar run: mv "build/debezium-offsetfile-conv-${{ inputs.version }}-runner.jar" "debezium-offsetfile-conv-${{ inputs.version }}.jar" - name: Add jar to release - if: github.event_name == 'release' && ${{ inputs.upload }} + if: ${{ github.event_name == 'release' && inputs.upload }} uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15 with: tag_name: ${{ inputs.version }} diff --git a/.github/workflows/determine_version.yaml b/.github/workflows/determine_version.yaml index 8c221c5..a212291 100644 --- a/.github/workflows/determine_version.yaml +++ b/.github/workflows/determine_version.yaml @@ -21,19 +21,19 @@ jobs: - name: Install SVU run: go install github.com/caarlos0/svu@00b733b056534c0fbdb316bbd37c023e7bb80905 #v1.11.0 - name: Get branch name (merge) - if: github.event_name != 'pull_request' && github.event_name != 'release' + if: ${{ github.event_name != 'pull_request' && github.event_name != 'release' }} run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV - name: Get branch name (pull request) - if: github.event_name == 'pull_request' + if: ${{ github.event_name == 'pull_request' }} run: echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF} | tr / -)" >> $GITHUB_ENV - name: Determine version (branch) - if: env.BRANCH_NAME != 'master' + if: ${{ env.BRANCH_NAME != 'master' }} run: 'echo "PROJECT_VERSION=$(svu --pre-release ${{ env.BRANCH_NAME }}-alpha.$(git rev-list origin/master.. --count))" >> "$GITHUB_ENV"' - name: Determine version (master) - if: github.event_name != 'release' && env.BRANCH_NAME == 'master' + if: ${{ github.event_name != 'release' && env.BRANCH_NAME == 'master' }} run: 'echo "PROJECT_VERSION=$(svu)" >> "$GITHUB_ENV"' - name: Determine version (release) - if: github.event_name == 'release' + if: ${{ github.event_name == 'release' }} run: 'echo "PROJECT_VERSION=${{ github.event.release.tag_name }}" >> "$GITHUB_ENV"' - run: 'echo "Determined version: $PROJECT_VERSION"' - run: 'echo "PROJECT_VERSION=$PROJECT_VERSION" >> "$GITHUB_OUTPUT"'