From 2918844289d818d34cf0da89d86cd0fe0cd995b7 Mon Sep 17 00:00:00 2001 From: "Paul B." Date: Tue, 26 Mar 2024 16:06:37 +0100 Subject: [PATCH] WIP: trying to apply an overlay before deploy --- .github/workflows/diff.yml | 7 +++++-- overlays/greenly-remove-operation.yaml | 8 ++++++++ tmp/.gitkeep | 0 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 overlays/greenly-remove-operation.yaml create mode 100644 tmp/.gitkeep diff --git a/.github/workflows/diff.yml b/.github/workflows/diff.yml index 951a61c..4953e72 100644 --- a/.github/workflows/diff.yml +++ b/.github/workflows/diff.yml @@ -51,13 +51,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 + - name: Apply overlay to API document + run: | + npx bump-cli overlay apis/greenly-openapi-source.json overlays/greenly-remove-operation.yaml > tmp/greenly-openapi-public.json - name: Comment pull request with API diff uses: bump-sh/github-action@v1 with: doc: greenly token: ${{ secrets.GREENLY_BUMP_TOKEN }} - file: apis/greenly-openapi-source.json + file: tmp/greenly-openapi-public.json command: diff env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/overlays/greenly-remove-operation.yaml b/overlays/greenly-remove-operation.yaml new file mode 100644 index 0000000..f77994a --- /dev/null +++ b/overlays/greenly-remove-operation.yaml @@ -0,0 +1,8 @@ +overlay: 1.0.0 +info: + title: Remove all get operations + version: 0.0.1 +actions: + - target: '$.paths.*.get' + description: remove first operation + remove: true diff --git a/tmp/.gitkeep b/tmp/.gitkeep new file mode 100644 index 0000000..e69de29