Skip to content

Commit

Permalink
ci: fix oasdiff.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Yurii Shynbuiev <[email protected]>
  • Loading branch information
yshyn-iohk committed May 1, 2024
1 parent 115327e commit 324d0a0
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/oasdiff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ defaults:
shell: bash

on:
# pull_request:
# branches:
# - main
pull_request:
branches:
- main

workflow_dispatch:
inputs:
Expand All @@ -34,23 +34,28 @@ jobs:
- name: Resolve the base OpenAPI spec URL
run: |
BASE_TAG="${{ github.event.inputs.base_tag }}"
if [[ $BASE_TAG == cloud-agent-v* ]]; then
if [ $BASE_TAG == 'cloud-agent-v*' ]; then
echo "BASE_URL=https://raw.githubusercontent.com/hyperledger/identus-cloud-agent/$BASE_TAG/cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml" >> $GITHUB_ENV
elif [[ $BASE_TAG == prism-agent-v* ]]; then
elif [ $BASE_TAG == 'prism-agent-v*' ]; then
echo "BASE_URL=https://raw.githubusercontent.com/hyperledger/identus-cloud-agent/$BASE_TAG/prism-agent/service/api/http/prism-agent-openapi-spec.yaml" >> $GITHUB_ENV
elif [[ $BASE_TAG == main ]]; then
elif [ $BASE_TAG == 'main' ]; then
echo "BASE_URL=https://raw.githubusercontent.com/hyperledger/identus-cloud-agent/$BASE_TAG/cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml" >> $GITHUB_ENV
elif [ ${{ github.event_name }} == 'pull_request' ]; then
echo "BASE_URL=https://raw.githubusercontent.com/hyperledger/identus-cloud-agent/main/cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml" >> $GITHUB_ENV
fi
- name: Resolve the revision OpenAPI spec URL
run: |
REV_TAG="${{ github.event.inputs.revision_tag }}"
if [[ $REV_TAG == cloud-agent-v* ]]; then
if [ $REV_TAG == 'cloud-agent-v*' ]; then
echo "REV_URL=https://raw.githubusercontent.com/hyperledger/identus-cloud-agent/$REV_TAG/cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml" >> $GITHUB_ENV
elif [[ $REV_TAG == prism-agent-v* ]]; then
elif [ $REV_TAG == 'prism-agent-v*' ]; then
echo "REV_URL=https://raw.githubusercontent.com/hyperledger/identus-cloud-agent/$REV_TAG/prism-agent/service/api/http/prism-agent-openapi-spec.yaml" >> $GITHUB_ENV
elif [[ $REV_TAG == main ]]; then
elif [ $REV_TAG == 'main' ]; then
echo "REV_URL=https://raw.githubusercontent.com/hyperledger/identus-cloud-agent/$REV_TAG/cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml" >> $GITHUB_ENV
elif [ ${{ github.event_name }} == 'pull_request' ]; then
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
echo "REV_URL=https://raw.githubusercontent.com/hyperledger/identus-cloud-agent/$BRANCH_NAME/cloud-agent/service/api/http/cloud-agent-openapi-spec.yaml" >> $GITHUB_ENV
fi
- name: Check URLS
Expand Down

0 comments on commit 324d0a0

Please sign in to comment.