From 4bccb92d3f8370ed9d7fd1230531f28ce5063f05 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sun, 25 Dec 2022 23:33:21 +0800 Subject: [PATCH] Fix bindist CI --- .github/workflows/bindists.yaml | 40 ++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/.github/workflows/bindists.yaml b/.github/workflows/bindists.yaml index eb0436e..4f1944b 100644 --- a/.github/workflows/bindists.yaml +++ b/.github/workflows/bindists.yaml @@ -78,7 +78,8 @@ jobs: run: | ${{ matrix.installCmd }} curl bash git ${{ matrix.toolRequirements }} - - uses: shpingalet007/pull-request-comment-trigger@696de492b50cee0ba671934893c91c5805a403b9 + - if: ${{ github.event_name != 'workflow_dispatch' }} + uses: shpingalet007/pull-request-comment-trigger@696de492b50cee0ba671934893c91c5805a403b9 id: check with: trigger: '@bindistTest ** ** **' @@ -87,7 +88,8 @@ jobs: env: GITHUB_TOKEN: '${{secrets.GITHUB_TOKEN}}' - - uses: shpingalet007/pull-request-comment-trigger@696de492b50cee0ba671934893c91c5805a403b9 + - if: ${{ github.event_name != 'workflow_dispatch' }} + uses: shpingalet007/pull-request-comment-trigger@696de492b50cee0ba671934893c91c5805a403b9 id: checkRef with: trigger: '@bindistTestRef ** ** ** **' @@ -104,13 +106,13 @@ jobs: - if: ${{ steps.checkRef.outputs.triggered != 'true' }} uses: actions/checkout@v3 - - if: ${{ github.event_name != 'workflow_dispatch' || steps.check.outputs.triggered == 'true' }} + - if: ${{ github.event_name != 'workflow_dispatch' && steps.check.outputs.triggered == 'true' }} continue-on-error: true name: Install ghcup and bindist run: | - [ -z "${TOOL}" ] && export TOOL=${{ fromJson(steps.check.outputs.arguments)[0] }} - [ -z "${VERSION}" ] && export VERSION=${{ fromJson(steps.check.outputs.arguments)[1] }} - [ -z "${METADATA_FILE}" ] && export METADATA_FILE=${{ fromJson(steps.check.outputs.arguments)[2] }} + export TOOL=${{ fromJson(steps.check.outputs.arguments)[0] }} + export VERSION=${{ fromJson(steps.check.outputs.arguments)[1] }} + export METADATA_FILE=${{ fromJson(steps.check.outputs.arguments)[2] }} .github/workflows/install-bindist.sh echo SUCCESS=true >> $GITHUB_ENV @@ -118,9 +120,9 @@ jobs: continue-on-error: true name: Install ghcup and bindist run: | - [ -z "${TOOL}" ] && export TOOL=${{ fromJson(steps.checkRef.outputs.arguments)[0] }} - [ -z "${VERSION}" ] && export VERSION=${{ fromJson(steps.checkRef.outputs.arguments)[1] }} - [ -z "${METADATA_FILE}" ] && export METADATA_FILE=${{ fromJson(steps.checkRef.outputs.arguments)[2] }} + export TOOL=${{ fromJson(steps.checkRef.outputs.arguments)[0] }} + export VERSION=${{ fromJson(steps.checkRef.outputs.arguments)[1] }} + export METADATA_FILE=${{ fromJson(steps.checkRef.outputs.arguments)[2] }} .github/workflows/install-bindist.sh echo SUCCESS=true >> $GITHUB_ENV @@ -155,7 +157,8 @@ jobs: - windows-latest runs-on: ${{ matrix.os }} steps: - - uses: shpingalet007/pull-request-comment-trigger@696de492b50cee0ba671934893c91c5805a403b9 + - if: ${{ github.event_name != 'workflow_dispatch' }} + uses: shpingalet007/pull-request-comment-trigger@696de492b50cee0ba671934893c91c5805a403b9 id: check with: trigger: '@bindistTest ** ** **' @@ -164,7 +167,8 @@ jobs: env: GITHUB_TOKEN: '${{secrets.GITHUB_TOKEN}}' - - uses: shpingalet007/pull-request-comment-trigger@696de492b50cee0ba671934893c91c5805a403b9 + - if: ${{ github.event_name != 'workflow_dispatch' }} + uses: shpingalet007/pull-request-comment-trigger@696de492b50cee0ba671934893c91c5805a403b9 id: checkRef with: trigger: '@bindistTestRef ** ** ** **' @@ -181,13 +185,13 @@ jobs: - if: ${{ steps.checkRef.outputs.triggered != 'true' }} uses: actions/checkout@v3 - - if: ${{ github.event_name != 'workflow_dispatch' || steps.check.outputs.triggered == 'true' }} + - if: ${{ github.event_name != 'workflow_dispatch' && steps.check.outputs.triggered == 'true' }} continue-on-error: true name: Install ghcup and bindist run: | - [ -z "${TOOL}" ] && export TOOL=${{ fromJson(steps.check.outputs.arguments)[0] }} - [ -z "${VERSION}" ] && export VERSION=${{ fromJson(steps.check.outputs.arguments)[1] }} - [ -z "${METADATA_FILE}" ] && export METADATA_FILE=${{ fromJson(steps.check.outputs.arguments)[2] }} + export TOOL=${{ fromJson(steps.check.outputs.arguments)[0] }} + export VERSION=${{ fromJson(steps.check.outputs.arguments)[1] }} + export METADATA_FILE=${{ fromJson(steps.check.outputs.arguments)[2] }} .github/workflows/install-bindist.sh echo SUCCESS=true >> $GITHUB_ENV @@ -195,9 +199,9 @@ jobs: continue-on-error: true name: Install ghcup and bindist run: | - [ -z "${TOOL}" ] && export TOOL=${{ fromJson(steps.checkRef.outputs.arguments)[0] }} - [ -z "${VERSION}" ] && export VERSION=${{ fromJson(steps.checkRef.outputs.arguments)[1] }} - [ -z "${METADATA_FILE}" ] && export METADATA_FILE=${{ fromJson(steps.checkRef.outputs.arguments)[2] }} + export TOOL=${{ fromJson(steps.checkRef.outputs.arguments)[0] }} + export VERSION=${{ fromJson(steps.checkRef.outputs.arguments)[1] }} + export METADATA_FILE=${{ fromJson(steps.checkRef.outputs.arguments)[2] }} .github/workflows/install-bindist.sh echo SUCCESS=true >> $GITHUB_ENV