From 67edd0a8993092a6215e05896f6eff6e2d5c0fee Mon Sep 17 00:00:00 2001 From: effoeffi Date: Sat, 13 May 2023 13:13:39 +0300 Subject: [PATCH 01/10] init --- .github/workflows/test.yaml | 27 +++++++++++++++++++++++++ .gitignore | 22 +-------------------- breaking-changes/Dockerfile | 3 +++ breaking-changes/action.yml | 20 +++++++++++++++++++ breaking-changes/entrypoint.sh | 16 +++++++++++++++ diff/action.yml | 25 +++++++++++++++++++++++ diff/entrypoint.sh | 36 ++++++++++++++++++++++++++++++++++ entrypoint.sh | 36 ++++++++++++++++++++++++++++++++++ 8 files changed, 164 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/test.yaml create mode 100644 breaking-changes/Dockerfile create mode 100644 breaking-changes/action.yml create mode 100755 breaking-changes/entrypoint.sh create mode 100644 diff/action.yml create mode 100755 diff/entrypoint.sh create mode 100755 entrypoint.sh diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..effada4 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,27 @@ +name: 'Test OpenAPI Spec Diff Action' +on: push +jobs: + # oas_diff_job: + # runs-on: ubuntu-latest + # name: A job to test OpenAPI Spec diff action + # steps: + # - name: checkout + # uses: actions/checkout@v3 + # - name: Running OpenAPI Spec diff action + # id: test_ete + # uses: ./ + # with: + # base: 'specs/base.yaml' + # revision: 'specs/revision.yaml' + oas_diff_breaking_changes_job: + runs-on: ubuntu-latest + name: A job to test OpenAPI Spec breaking changes + steps: + - name: checkout + uses: actions/checkout@v3 + - name: Running OpenAPI Spec check breaking action + id: test_breaking_changes + uses: ./ + with: + base: https://raw.githubusercontent.com/Tufin/oasdiff/main/data/openapi-test1.yaml + revision: https://raw.githubusercontent.com/Tufin/oasdiff/main/data/openapi-test3.yaml diff --git a/.gitignore b/.gitignore index 3b735ec..1c2d52b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,21 +1 @@ -# If you prefer the allow list template instead of the deny list, see community template: -# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore -# -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib - -# Test binary, built with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Dependency directories (remove the comment below to include it) -# vendor/ - -# Go workspace file -go.work +.idea/* diff --git a/breaking-changes/Dockerfile b/breaking-changes/Dockerfile new file mode 100644 index 0000000..9d0c98c --- /dev/null +++ b/breaking-changes/Dockerfile @@ -0,0 +1,3 @@ +FROM tufin/oasdiff:main +COPY entrypoint.sh /entrypoint.sh +ENTRYPOINT ["/entrypoint.sh"] \ No newline at end of file diff --git a/breaking-changes/action.yml b/breaking-changes/action.yml new file mode 100644 index 0000000..bd59c77 --- /dev/null +++ b/breaking-changes/action.yml @@ -0,0 +1,20 @@ +name: 'OpenAPI Spec Diff' +description: 'Detect breaking changes in OpenAPI Specification 3' +inputs: + base: + description: 'Path of original OpenAPI spec in YAML or JSON format' + required: true + revision: + description: 'Path of revised OpenAPI spec in YAML or JSON format' + required: true + fail-on-diff: + description: 'Fail with exit code 1 if a difference is found' + required: false + default: false +runs: + using: 'docker' + image: 'Dockerfile' + args: + - ${{ inputs.base }} + - ${{ inputs.revision }} + - ${{ inputs.fail-on-diff }} diff --git a/breaking-changes/entrypoint.sh b/breaking-changes/entrypoint.sh new file mode 100755 index 0000000..305aba2 --- /dev/null +++ b/breaking-changes/entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -e + +readonly base="$1" +readonly revision="$2" +readonly fail_on_diff="$6" + +echo "running oasdiff check for breaking-changes... base: $base, revision: $revision, fail_on_diff: $fail_on_diff" + +if [ "$fail_on_diff" = "true" ] +then + oasdiff -check-breaking -fail-on-diff -base "$base" -revision "$revision" +else +then + oasdiff -check-breaking -base "$base" -revision "$revision" +fi diff --git a/diff/action.yml b/diff/action.yml new file mode 100644 index 0000000..6820117 --- /dev/null +++ b/diff/action.yml @@ -0,0 +1,25 @@ +name: 'OpenAPI Spec Diff' +description: 'A diff tool for OpenAPI Specification 3' +inputs: + base: + description: 'Path of original OpenAPI spec in YAML or JSON format' + required: true + revision: + description: 'Path of revised OpenAPI spec in YAML or JSON format' + required: true + format: + description: 'Output format' + required: false + default: 'yaml' + fail-on-diff: + description: 'Fail with exit code 1 if a difference is found' + required: false + default: false +runs: + using: 'docker' + image: 'Dockerfile' + args: + - ${{ inputs.base }} + - ${{ inputs.revision }} + - ${{ inputs.format }} + - ${{ inputs.fail-on-diff }} diff --git a/diff/entrypoint.sh b/diff/entrypoint.sh new file mode 100755 index 0000000..25bd54c --- /dev/null +++ b/diff/entrypoint.sh @@ -0,0 +1,36 @@ +#!/bin/sh +set -e + +readonly base="$1" +readonly revision="$2" +readonly format="$3" +readonly breaking_only="$4" +readonly check_breaking="$5" +readonly fail_on_diff="$6" + +echo "running oasdiff... base: $base, revision: $revision, format: $format, breaking_only: $breaking_only, check_breaking: $check_breaking, fail_on_diff: $fail_on_diff" + +if [ "$check_breaking" = "true" ] && [ "$fail_on_diff" = "true" ] +then + echo "running check_breaking and fail_on_diff..." + oasdiff -check-breaking -fail-on-diff -format "$format" -base "$base" -revision "$revision" +elif [ "$check_breaking" = "true" ] +then + echo "running check_breaking..." + oasdiff -check-breaking -format "$format" -base "$base" -revision "$revision" +elif [ "$breaking_only" = "true" ] && [ "$fail_on_diff" = "true" ] +then + echo "running breaking_only and fail_on_diff..." + oasdiff -breaking-only -fail-on-diff -format "$format" -base "$base" -revision "$revision" +elif [ "$breaking_only" = "true" ] +then + echo "running breaking_only..." + oasdiff -breaking-only -format "$format" -base "$base" -revision "$revision" +elif [ "$fail_on_diff" = "true" ] +then + echo "running fail_on_diff..." + oasdiff -fail-on-diff -format "$format" -base "$base" -revision "$revision" +else + echo "running default..." + oasdiff -format "$format" -base "$base" -revision "$revision" +fi diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..25bd54c --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,36 @@ +#!/bin/sh +set -e + +readonly base="$1" +readonly revision="$2" +readonly format="$3" +readonly breaking_only="$4" +readonly check_breaking="$5" +readonly fail_on_diff="$6" + +echo "running oasdiff... base: $base, revision: $revision, format: $format, breaking_only: $breaking_only, check_breaking: $check_breaking, fail_on_diff: $fail_on_diff" + +if [ "$check_breaking" = "true" ] && [ "$fail_on_diff" = "true" ] +then + echo "running check_breaking and fail_on_diff..." + oasdiff -check-breaking -fail-on-diff -format "$format" -base "$base" -revision "$revision" +elif [ "$check_breaking" = "true" ] +then + echo "running check_breaking..." + oasdiff -check-breaking -format "$format" -base "$base" -revision "$revision" +elif [ "$breaking_only" = "true" ] && [ "$fail_on_diff" = "true" ] +then + echo "running breaking_only and fail_on_diff..." + oasdiff -breaking-only -fail-on-diff -format "$format" -base "$base" -revision "$revision" +elif [ "$breaking_only" = "true" ] +then + echo "running breaking_only..." + oasdiff -breaking-only -format "$format" -base "$base" -revision "$revision" +elif [ "$fail_on_diff" = "true" ] +then + echo "running fail_on_diff..." + oasdiff -fail-on-diff -format "$format" -base "$base" -revision "$revision" +else + echo "running default..." + oasdiff -format "$format" -base "$base" -revision "$revision" +fi From 1c7a604f72fad70fc691c13ee6c648a0b51486bd Mon Sep 17 00:00:00 2001 From: effoeffi Date: Sat, 13 May 2023 13:49:13 +0300 Subject: [PATCH 02/10] action path --- .github/workflows/test.yaml | 2 +- {breaking-changes => check-breaking}/Dockerfile | 0 {breaking-changes => check-breaking}/action.yml | 0 {breaking-changes => check-breaking}/entrypoint.sh | 0 4 files changed, 1 insertion(+), 1 deletion(-) rename {breaking-changes => check-breaking}/Dockerfile (100%) rename {breaking-changes => check-breaking}/action.yml (100%) rename {breaking-changes => check-breaking}/entrypoint.sh (100%) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index effada4..095cd2c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -21,7 +21,7 @@ jobs: uses: actions/checkout@v3 - name: Running OpenAPI Spec check breaking action id: test_breaking_changes - uses: ./ + uses: ./check-breaking with: base: https://raw.githubusercontent.com/Tufin/oasdiff/main/data/openapi-test1.yaml revision: https://raw.githubusercontent.com/Tufin/oasdiff/main/data/openapi-test3.yaml diff --git a/breaking-changes/Dockerfile b/check-breaking/Dockerfile similarity index 100% rename from breaking-changes/Dockerfile rename to check-breaking/Dockerfile diff --git a/breaking-changes/action.yml b/check-breaking/action.yml similarity index 100% rename from breaking-changes/action.yml rename to check-breaking/action.yml diff --git a/breaking-changes/entrypoint.sh b/check-breaking/entrypoint.sh similarity index 100% rename from breaking-changes/entrypoint.sh rename to check-breaking/entrypoint.sh From ba695381f26155523cb98b4212afeb9ae72d6670 Mon Sep 17 00:00:00 2001 From: effoeffi Date: Sat, 13 May 2023 13:50:54 +0300 Subject: [PATCH 03/10] fix sh syntax --- check-breaking/entrypoint.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/check-breaking/entrypoint.sh b/check-breaking/entrypoint.sh index 305aba2..7f75925 100755 --- a/check-breaking/entrypoint.sh +++ b/check-breaking/entrypoint.sh @@ -11,6 +11,5 @@ if [ "$fail_on_diff" = "true" ] then oasdiff -check-breaking -fail-on-diff -base "$base" -revision "$revision" else -then oasdiff -check-breaking -base "$base" -revision "$revision" fi From 2b38545da5c19dad6da97706fdb522b59ccccd1b Mon Sep 17 00:00:00 2001 From: effoeffi Date: Sat, 13 May 2023 13:56:51 +0300 Subject: [PATCH 04/10] diff --- .github/workflows/test.yaml | 25 +++++++++++++------------ check-breaking/entrypoint.sh | 2 +- diff/Dockerfile | 3 +++ diff/entrypoint.sh | 26 +++----------------------- entrypoint.sh | 36 ------------------------------------ 5 files changed, 20 insertions(+), 72 deletions(-) create mode 100644 diff/Dockerfile delete mode 100755 entrypoint.sh diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 095cd2c..de0d2cb 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,18 +1,19 @@ name: 'Test OpenAPI Spec Diff Action' on: push jobs: - # oas_diff_job: - # runs-on: ubuntu-latest - # name: A job to test OpenAPI Spec diff action - # steps: - # - name: checkout - # uses: actions/checkout@v3 - # - name: Running OpenAPI Spec diff action - # id: test_ete - # uses: ./ - # with: - # base: 'specs/base.yaml' - # revision: 'specs/revision.yaml' + oas_diff_job: + runs-on: ubuntu-latest + name: A job to test OpenAPI Spec diff action + steps: + - name: checkout + uses: actions/checkout@v3 + - name: Running OpenAPI Spec diff action + id: test_ete + uses: ./diff + with: + base: 'specs/base.yaml' + revision: 'specs/revision.yaml' + format: 'text' oas_diff_breaking_changes_job: runs-on: ubuntu-latest name: A job to test OpenAPI Spec breaking changes diff --git a/check-breaking/entrypoint.sh b/check-breaking/entrypoint.sh index 7f75925..7a04c8a 100755 --- a/check-breaking/entrypoint.sh +++ b/check-breaking/entrypoint.sh @@ -3,7 +3,7 @@ set -e readonly base="$1" readonly revision="$2" -readonly fail_on_diff="$6" +readonly fail_on_diff="$3" echo "running oasdiff check for breaking-changes... base: $base, revision: $revision, fail_on_diff: $fail_on_diff" diff --git a/diff/Dockerfile b/diff/Dockerfile new file mode 100644 index 0000000..9d0c98c --- /dev/null +++ b/diff/Dockerfile @@ -0,0 +1,3 @@ +FROM tufin/oasdiff:main +COPY entrypoint.sh /entrypoint.sh +ENTRYPOINT ["/entrypoint.sh"] \ No newline at end of file diff --git a/diff/entrypoint.sh b/diff/entrypoint.sh index 25bd54c..69da3b2 100755 --- a/diff/entrypoint.sh +++ b/diff/entrypoint.sh @@ -4,33 +4,13 @@ set -e readonly base="$1" readonly revision="$2" readonly format="$3" -readonly breaking_only="$4" -readonly check_breaking="$5" -readonly fail_on_diff="$6" +readonly fail_on_diff="$4" -echo "running oasdiff... base: $base, revision: $revision, format: $format, breaking_only: $breaking_only, check_breaking: $check_breaking, fail_on_diff: $fail_on_diff" +echo "running oasdiff... base: $base, revision: $revision, format: $format, fail_on_diff: $fail_on_diff" -if [ "$check_breaking" = "true" ] && [ "$fail_on_diff" = "true" ] +if [ "$fail_on_diff" = "true" ] then - echo "running check_breaking and fail_on_diff..." - oasdiff -check-breaking -fail-on-diff -format "$format" -base "$base" -revision "$revision" -elif [ "$check_breaking" = "true" ] -then - echo "running check_breaking..." - oasdiff -check-breaking -format "$format" -base "$base" -revision "$revision" -elif [ "$breaking_only" = "true" ] && [ "$fail_on_diff" = "true" ] -then - echo "running breaking_only and fail_on_diff..." - oasdiff -breaking-only -fail-on-diff -format "$format" -base "$base" -revision "$revision" -elif [ "$breaking_only" = "true" ] -then - echo "running breaking_only..." - oasdiff -breaking-only -format "$format" -base "$base" -revision "$revision" -elif [ "$fail_on_diff" = "true" ] -then - echo "running fail_on_diff..." oasdiff -fail-on-diff -format "$format" -base "$base" -revision "$revision" else - echo "running default..." oasdiff -format "$format" -base "$base" -revision "$revision" fi diff --git a/entrypoint.sh b/entrypoint.sh deleted file mode 100755 index 25bd54c..0000000 --- a/entrypoint.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -set -e - -readonly base="$1" -readonly revision="$2" -readonly format="$3" -readonly breaking_only="$4" -readonly check_breaking="$5" -readonly fail_on_diff="$6" - -echo "running oasdiff... base: $base, revision: $revision, format: $format, breaking_only: $breaking_only, check_breaking: $check_breaking, fail_on_diff: $fail_on_diff" - -if [ "$check_breaking" = "true" ] && [ "$fail_on_diff" = "true" ] -then - echo "running check_breaking and fail_on_diff..." - oasdiff -check-breaking -fail-on-diff -format "$format" -base "$base" -revision "$revision" -elif [ "$check_breaking" = "true" ] -then - echo "running check_breaking..." - oasdiff -check-breaking -format "$format" -base "$base" -revision "$revision" -elif [ "$breaking_only" = "true" ] && [ "$fail_on_diff" = "true" ] -then - echo "running breaking_only and fail_on_diff..." - oasdiff -breaking-only -fail-on-diff -format "$format" -base "$base" -revision "$revision" -elif [ "$breaking_only" = "true" ] -then - echo "running breaking_only..." - oasdiff -breaking-only -format "$format" -base "$base" -revision "$revision" -elif [ "$fail_on_diff" = "true" ] -then - echo "running fail_on_diff..." - oasdiff -fail-on-diff -format "$format" -base "$base" -revision "$revision" -else - echo "running default..." - oasdiff -format "$format" -base "$base" -revision "$revision" -fi From d36b9c80657ce914c8ac3383606c60eef14502e5 Mon Sep 17 00:00:00 2001 From: effoeffi Date: Sat, 13 May 2023 14:00:05 +0300 Subject: [PATCH 05/10] specs added --- specs/base.yaml | 111 +++++++++++++++++++++++++++++++++++++++ specs/revision.yaml | 123 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 234 insertions(+) create mode 100644 specs/base.yaml create mode 100644 specs/revision.yaml diff --git a/specs/base.yaml b/specs/base.yaml new file mode 100644 index 0000000..acdeb1f --- /dev/null +++ b/specs/base.yaml @@ -0,0 +1,111 @@ +openapi: "3.0.0" +info: + version: 1.0.0 + title: Swagger Petstore + license: + name: MIT +servers: + - url: http://petstore.swagger.io/v1 +paths: + /pets: + get: + summary: List all pets + operationId: listPets + tags: + - pets + parameters: + - name: limit + in: query + description: How many items to return at one time (max 100) + required: false + schema: + type: integer + format: int32 + responses: + '200': + description: A paged array of pets + headers: + x-next: + description: A link to the next page of responses + schema: + type: string + content: + application/json: + schema: + $ref: "#/components/schemas/Pets" + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + post: + summary: Create a pet + operationId: createPets + tags: + - pets + responses: + '201': + description: Null response + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + /pets/{petId}: + get: + summary: Info for a specific pet + operationId: showPetById + tags: + - pets + parameters: + - name: petId + in: path + required: true + description: The id of the pet to retrieve + schema: + type: string + responses: + '200': + description: Expected response to a valid request + content: + application/json: + schema: + $ref: "#/components/schemas/Pet" + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" +components: + schemas: + Pet: + type: object + required: + - id + - name + properties: + id: + type: integer + format: int64 + name: + type: string + tag: + type: string + Pets: + type: array + items: + $ref: "#/components/schemas/Pet" + Error: + type: object + required: + - code + - message + properties: + code: + type: integer + format: int32 + message: + type: string \ No newline at end of file diff --git a/specs/revision.yaml b/specs/revision.yaml new file mode 100644 index 0000000..fdf6298 --- /dev/null +++ b/specs/revision.yaml @@ -0,0 +1,123 @@ +openapi: "3.0.0" +info: + version: 1.0.0 + title: Swagger Petstore + license: + name: MIT +servers: + - url: http://petstore.swagger.io/v1 +paths: + /healthcheck: + get: + summary: Health Check + description: >- + The healthcheck endpoint provides detailed information about the health + of a web service. If each of the components required by the service are + healthy, then the service is considered healthy and will return a 200 OK + response. If any of the components needed by the service are unhealthy, + then a 503 Service Unavailable response will be provided. + responses: + '200': + description: Health Check report + /pets: + get: + summary: List all pets + operationId: listPets + tags: + - pets + parameters: + - name: limit + in: query + description: How many items to return at one time (max 100) + required: false + schema: + type: integer + format: int32 + responses: + '200': + description: A paged array of pets + headers: + x-next: + description: A link to the next page of responses + schema: + type: string + content: + application/json: + schema: + $ref: "#/components/schemas/Pets" + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + post: + summary: Create a pet + operationId: createPets + tags: + - pets + responses: + '201': + description: Null response + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + /pets/{petId}: + get: + summary: Info for a specific pet + operationId: showPetById + tags: + - pets + parameters: + - name: petId + in: path + required: true + description: The id of the pet to retrieve + schema: + type: string + responses: + '200': + description: Expected response to a valid request + content: + application/json: + schema: + $ref: "#/components/schemas/Pet" + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" +components: + schemas: + Pet: + type: object + required: + - id + - name + properties: + id: + type: integer + format: int64 + name: + type: string + tag: + type: string + Pets: + type: array + items: + $ref: "#/components/schemas/Pet" + Error: + type: object + required: + - code + - message + properties: + code: + type: integer + format: int32 + message: + type: string \ No newline at end of file From 2621a84cb3c1327d5889391c39e871aeb865fc5b Mon Sep 17 00:00:00 2001 From: effoeffi Date: Sat, 13 May 2023 14:16:53 +0300 Subject: [PATCH 06/10] docs --- README.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b84541d..04539d4 100644 --- a/README.md +++ b/README.md @@ -1 +1,32 @@ -# oasdiff-action \ No newline at end of file +# oasdiff-action +[![CI](https://github.com/oasdiff/oasdiff-action/actions/workflows/test.yaml/badge.svg)](https://github.com/oasdiff/oasdiff-action/actions) + +GitHub actions for comparing OpenAPI specs and detect breaking changes, based on [oasdiff](https://github.com/Tufin/oasdiff) tool + +## How to use? +Depend on your use case: + +### Find diff +Copy and paste the following snippet into your build .yml file: +``` +- name: Running OpenAPI Spec diff action + id: test_ete + uses: ./diff + with: + base: 'specs/base.yaml' + revision: 'specs/revision.yaml' + format: 'text' + fail-on-diff: false +``` + +### Check for breaking API changes, and fail if any are found +Copy and paste the following snippet into your build .yml file: +``` +- name: Running OpenAPI Spec diff action + id: test_ete + uses: ./check-breaking + with: + base: https://raw.githubusercontent.com/Tufin/oasdiff/main/data/openapi-test1.yaml + revision: https://raw.githubusercontent.com/Tufin/oasdiff/main/data/openapi-test3.yaml + fail-on-diff: true +``` From 66794997f68a5a3a512a4e244f1302f25618de4d Mon Sep 17 00:00:00 2001 From: effoeffi Date: Sun, 14 May 2023 11:27:54 +0300 Subject: [PATCH 07/10] test latest --- .github/workflows/test.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index de0d2cb..b6b7190 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -26,3 +26,15 @@ jobs: with: base: https://raw.githubusercontent.com/Tufin/oasdiff/main/data/openapi-test1.yaml revision: https://raw.githubusercontent.com/Tufin/oasdiff/main/data/openapi-test3.yaml + oas_diff_breaking_changes_latest_job: + runs-on: ubuntu-latest + name: A job to test OpenAPI Spec breaking changes + steps: + - name: checkout + uses: actions/checkout@v3 + - name: Running OpenAPI Spec check breaking latest action + id: test_breaking_changes + uses: oasdiff/oasdiff-action/check-breaking@latest + with: + base: https://raw.githubusercontent.com/Tufin/oasdiff/main/data/openapi-test1.yaml + revision: https://raw.githubusercontent.com/Tufin/oasdiff/main/data/openapi-test3.yaml From 65dfd770ceda07c3f6d8e1909f8ebac2cf42bf83 Mon Sep 17 00:00:00 2001 From: effoeffi Date: Sun, 14 May 2023 11:33:46 +0300 Subject: [PATCH 08/10] test --- .github/workflows/test.yaml | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b6b7190..3f822d6 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -28,7 +28,7 @@ jobs: revision: https://raw.githubusercontent.com/Tufin/oasdiff/main/data/openapi-test3.yaml oas_diff_breaking_changes_latest_job: runs-on: ubuntu-latest - name: A job to test OpenAPI Spec breaking changes + name: A job to test latest release of OpenAPI Spec breaking changes action steps: - name: checkout uses: actions/checkout@v3 diff --git a/README.md b/README.md index 04539d4..4acd8f3 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Copy and paste the following snippet into your build .yml file: ``` - name: Running OpenAPI Spec diff action id: test_ete - uses: ./diff + uses: oasdiff/oasdiff-action/diff@latest with: base: 'specs/base.yaml' revision: 'specs/revision.yaml' @@ -24,7 +24,7 @@ Copy and paste the following snippet into your build .yml file: ``` - name: Running OpenAPI Spec diff action id: test_ete - uses: ./check-breaking + uses: oasdiff/oasdiff-action/check-breaking@latest with: base: https://raw.githubusercontent.com/Tufin/oasdiff/main/data/openapi-test1.yaml revision: https://raw.githubusercontent.com/Tufin/oasdiff/main/data/openapi-test3.yaml From 641a6b860c7685df1830855528eb7a7e8f4fd11a Mon Sep 17 00:00:00 2001 From: effoeffi Date: Sun, 14 May 2023 11:38:13 +0300 Subject: [PATCH 09/10] tag --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 3f822d6..fad0f5c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -34,7 +34,7 @@ jobs: uses: actions/checkout@v3 - name: Running OpenAPI Spec check breaking latest action id: test_breaking_changes - uses: oasdiff/oasdiff-action/check-breaking@latest + uses: oasdiff/oasdiff-action/check-breaking@test-temp with: base: https://raw.githubusercontent.com/Tufin/oasdiff/main/data/openapi-test1.yaml revision: https://raw.githubusercontent.com/Tufin/oasdiff/main/data/openapi-test3.yaml From 674f52946466be2e5fd3ab709977395da98017db Mon Sep 17 00:00:00 2001 From: effoeffi Date: Sun, 14 May 2023 12:10:54 +0300 Subject: [PATCH 10/10] use latest tag --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index fad0f5c..3f822d6 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -34,7 +34,7 @@ jobs: uses: actions/checkout@v3 - name: Running OpenAPI Spec check breaking latest action id: test_breaking_changes - uses: oasdiff/oasdiff-action/check-breaking@test-temp + uses: oasdiff/oasdiff-action/check-breaking@latest with: base: https://raw.githubusercontent.com/Tufin/oasdiff/main/data/openapi-test1.yaml revision: https://raw.githubusercontent.com/Tufin/oasdiff/main/data/openapi-test3.yaml