Skip to content

Commit

Permalink
chore(ci): fix condition for getting Kong license (#819)
Browse files Browse the repository at this point in the history
  • Loading branch information
czeslavo authored Oct 28, 2024
1 parent 34c7c2e commit c145915
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/__release-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,19 @@ jobs:
with:
install: false

# This step is required to check if the OP Service Account Token is available and export a boolean output
# to be used in the next step. It's because we cannot use a secret in a step's condition.
# See: https://github.com/actions/runner/issues/520
- name: Check OP Service Account Token available
id: check-op-service-account-token
run: |
# If secrets.op-service-account-token is set, return true.
if [ -n "${{ secrets.op-service-account-token }}" ]; then
echo "provided=true" >> "$GITHUB_OUTPUT"
fi
- name: Get Kong Enterprise License
if: secrets.op-service-account-token != ''
if: steps.check-op-service-account-token.outputs.provided == 'true'
id: get-license
uses: Kong/kong-license@master
with:
Expand Down Expand Up @@ -194,8 +205,19 @@ jobs:
with:
install: false

# This step is required to check if the OP Service Account Token is available and export a boolean output
# to be used in the next step. It's because we cannot use a secret in a step's condition.
# See: https://github.com/actions/runner/issues/520
- name: Check OP Service Account Token available
id: check-op-service-account-token
run: |
# If secrets.op-service-account-token is set, return true.
if [ -n "${{ secrets.op-service-account-token }}" ]; then
echo "provided=true" >> "$GITHUB_OUTPUT"
fi
- name: Get Kong Enterprise License
if: ${{ secrets.op-service-account-token }}
if: steps.check-op-service-account-token.outputs.provided == 'true'
id: get-license
uses: Kong/kong-license@master
with:
Expand Down

0 comments on commit c145915

Please sign in to comment.