From fa4fc900910f7e0071e4a3145e9cf3dcb3d83f6a Mon Sep 17 00:00:00 2001 From: Joan Fontanals Date: Tue, 25 Oct 2022 15:36:35 +0200 Subject: [PATCH] ci: fix token check in workflows (#5309) Co-authored-by: Jackmin801 --- .github/workflows/force-docker-build.yml | 11 +++++++++-- .github/workflows/force-docs-build.yml | 11 +++++++++-- .github/workflows/force-release.yml | 11 +++++++++-- .github/workflows/update-announcement.yml | 11 +++++++++-- 4 files changed, 36 insertions(+), 8 deletions(-) diff --git a/.github/workflows/force-docker-build.yml b/.github/workflows/force-docker-build.yml index 3b55ca741bc2d..eadec083dcb13 100644 --- a/.github/workflows/force-docker-build.yml +++ b/.github/workflows/force-docker-build.yml @@ -15,10 +15,17 @@ jobs: token-check: runs-on: ubuntu-latest steps: - - run: echo "success!" - if: "${{ github.event.inputs.release_token }} == ${{ env.release_token }}" + - name: Check release token + id: token-check + run: | + touch SUCCESS + if: inputs.release_token == env.release_token env: release_token: ${{ secrets.JINA_CORE_RELEASE_TOKEN }} + - name: Fail release token + run: | + [[ -f SUCCESS ]] + regular-release: needs: token-check diff --git a/.github/workflows/force-docs-build.yml b/.github/workflows/force-docs-build.yml index e3106beb37a7f..1425346903050 100644 --- a/.github/workflows/force-docs-build.yml +++ b/.github/workflows/force-docs-build.yml @@ -15,10 +15,17 @@ jobs: token-check: runs-on: ubuntu-latest steps: - - run: echo "success!" - if: "${{ github.event.inputs.release_token }} == ${{ env.release_token }}" + - name: Check release token + id: token-check + run: | + touch SUCCESS + if: inputs.release_token == env.release_token env: release_token: ${{ secrets.JINA_CORE_RELEASE_TOKEN }} + - name: Fail release token + run: | + [[ -f SUCCESS ]] + regular-release: needs: token-check diff --git a/.github/workflows/force-release.yml b/.github/workflows/force-release.yml index 2c9dff18a3a29..7a94095b7a4d3 100644 --- a/.github/workflows/force-release.yml +++ b/.github/workflows/force-release.yml @@ -14,10 +14,17 @@ jobs: token-check: runs-on: ubuntu-latest steps: - - run: echo "success!" - if: "${{ github.event.inputs.release_token }} == ${{ env.release_token }}" + - name: Check release token + id: token-check + run: | + touch SUCCESS + if: inputs.release_token == env.release_token env: release_token: ${{ secrets.JINA_CORE_RELEASE_TOKEN }} + - name: Fail release token + run: | + [[ -f SUCCESS ]] + hub-integration: needs: token-check diff --git a/.github/workflows/update-announcement.yml b/.github/workflows/update-announcement.yml index 86f58fb99b36b..bfa339c2f3be2 100644 --- a/.github/workflows/update-announcement.yml +++ b/.github/workflows/update-announcement.yml @@ -17,10 +17,17 @@ jobs: token-check: runs-on: ubuntu-latest steps: - - run: echo "success!" - if: "${{ github.event.inputs.release_token }} == ${{ env.release_token }}" + - name: Check release token + id: token-check + run: | + touch SUCCESS + if: inputs.release_token == env.release_token env: release_token: ${{ secrets.JINA_CORE_RELEASE_TOKEN }} + - name: Fail release token + run: | + [[ -f SUCCESS ]] + update-announcement: needs: token-check