From d7160798da787432c9206a7df09861e3e1edee74 Mon Sep 17 00:00:00 2001 From: Francesco Belacca Date: Thu, 4 Jul 2024 12:02:11 +0200 Subject: [PATCH 1/3] Update run-extractor.yaml --- tools/github_workflows/run-extractor.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/github_workflows/run-extractor.yaml b/tools/github_workflows/run-extractor.yaml index 0c502ba..4d17bcb 100644 --- a/tools/github_workflows/run-extractor.yaml +++ b/tools/github_workflows/run-extractor.yaml @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-latest environment: dev # change this to match the dev environment created in settings steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run extractor without Config Yaml if: ${{ github.event.inputs.CONFIGURATION_YAML_PATH == 'Extract All APIs' }} @@ -144,7 +144,7 @@ jobs: shell: pwsh - name: publish artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 env: API_MANAGEMENT_SERVICE_OUTPUT_FOLDER_PATH: apimartifacts # change this to the artifacts folder with: @@ -155,10 +155,10 @@ jobs: needs: extract runs-on: [ubuntu-latest] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Download artifacts-from-portal - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 env: API_MANAGEMENT_SERVICE_OUTPUT_FOLDER_PATH: apimartifacts # change this to the artifacts folder with: @@ -166,7 +166,7 @@ jobs: path: "${{ GITHUB.WORKSPACE }}/${{ env.API_MANAGEMENT_SERVICE_OUTPUT_FOLDER_PATH }}" - name: Create artifacts pull request - uses: peter-evans/create-pull-request@v3 + uses: peter-evans/create-pull-request@v6 env: API_MANAGEMENT_SERVICE_OUTPUT_FOLDER_PATH: apimartifacts # change this to the artifacts folder with: @@ -175,4 +175,4 @@ jobs: title: "${{ env.API_MANAGEMENT_SERVICE_OUTPUT_FOLDER_PATH }} - extract" body: > This PR is auto-generated by Github actions workflow - labels: extract, automated pr \ No newline at end of file + labels: extract, automated pr From 204e5dd0dda15e3bd6e0180647d6ffaf7ff8ad28 Mon Sep 17 00:00:00 2001 From: Francesco Belacca Date: Thu, 4 Jul 2024 12:05:45 +0200 Subject: [PATCH 2/3] Update run-publisher-with-env.yaml --- tools/github_workflows/run-publisher-with-env.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/github_workflows/run-publisher-with-env.yaml b/tools/github_workflows/run-publisher-with-env.yaml index c8c6652..df259e9 100644 --- a/tools/github_workflows/run-publisher-with-env.yaml +++ b/tools/github_workflows/run-publisher-with-env.yaml @@ -27,21 +27,21 @@ jobs: environment: ${{ inputs.API_MANAGEMENT_ENVIRONMENT }} steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 2 # Run Spectral - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: - node-version: "14" - - run: npm install -g @stoplight/spectral + node-version: "20" + - run: npm install -g @stoplight/spectral-cli - run: spectral lint "${{ GITHUB.WORKSPACE }}/${{ inputs.API_MANAGEMENT_SERVICE_OUTPUT_FOLDER_PATH }}\apis\*.{json,yml,yaml}" --ruleset https://raw.githubusercontent.com/connectedcircuits/devops-api-linter/main/rules.yaml # Add this step for each APIM environment and pass specific set of secrets that you want replaced in the env section below - name: "Perform namevalue secret substitution in configuration.${{ inputs.API_MANAGEMENT_ENVIRONMENT}}.yaml" if: (inputs.API_MANAGEMENT_ENVIRONMENT == 'prod' ) - uses: cschleiden/replace-tokens@v1.1 + uses: cschleiden/replace-tokens@v1.3 with: tokenPrefix: "{#" tokenSuffix: "#}" From 63782f0f0dcae42d3dbb2869e86615236932303a Mon Sep 17 00:00:00 2001 From: Francesco Belacca Date: Thu, 4 Jul 2024 12:07:50 +0200 Subject: [PATCH 3/3] Update run-publisher.yaml --- tools/github_workflows/run-publisher.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/github_workflows/run-publisher.yaml b/tools/github_workflows/run-publisher.yaml index 516171e..198c9dc 100644 --- a/tools/github_workflows/run-publisher.yaml +++ b/tools/github_workflows/run-publisher.yaml @@ -25,8 +25,7 @@ jobs: # Set the COMMIT_ID env variable - name: Set the Commit Id id: commit - run: | - echo "::set-output name=commit_id::${{ github.sha }}" + run: echo "commit_id=${GITHUB_SHA}" >> $GITHUB_ENV outputs: commit_id: ${{ steps.commit.outputs.commit_id }} #Publish with Commit ID